98-361 : Software Development Fundamentals : Part 05
-
DRAG DROP
You are developing an application that displays a list of race results. The race results are stored in the following class:You need to implement the Add Race method.
Match the code segment to its location. (To answer, drag the appropriate code segment from the column on the left to its location on the right, Each code segment may be used once, more than once, or not at all. Each correct match is worth one point.)
-
DRAG DROP
You are developing an application to display track and field race results.The application must display the race results twice. The first time it must display only the winner and runner-up. The second time it must display all participants. The code used to display results is shown below.
You need to implement the Rankings() function.
Complete the function to meet the requirements. {To answer, drag the appropriate code segment from the column on the left to its location on the right. Each code segment may be used once, more than once, or not at all. Each correct match is worth one point.)
Explanation:* You can use a yield break statement to end the iteration.
-
HOTSPOT
You are reviewing the following code that saves uploaded images.For each of the following statements, select Yes if the statement is true. Otherwise, select No. Each correct selection is worth one point.
-
The following functions are defined:
What does the console display after the following line?
Printer(2);
- 210
- 211
- 2101
- 2121
-
The throw keyword is used to perform which two actions? (Choose two.)
- stop processing of the code
- move error handling to a separate thread
- raise exceptions
- re-throw exceptions as a different type
Explanation:* The Throw statement throws an exception that you can handle with structured exception-handling code (Try…Catch…Finally) or unstructured exception-handling code (On Error GoTo). You can use the Throw statement to trap errors within your code because Visual Basic moves up the call stack until it finds the appropriate exception-handling code.
* This example throws an ApplicationException exception.
Throw New ApplicationException -
HOTSPOT
You have the following flowchart:Use the drop-down menus to select the answer choice that completes each statement Each correct selection is worth one point.
-
Which three phrases are advantages of connection pooling? (Choose three.)
- reduces time to create a connection
- requires no configuration
- reduces load on the server
- improved scalability
- improved performance
Explanation:E: In connection pooling, after a connection is created, it is placed in the pool and it is used over again so that a new connection does not have to be established.
D: Connection pooling often improves application performance, concurrency and scalability.
A: Connection pooling also cuts down on the amount of time a user must wait to establish a connection to the database. -
You are creating a database for a student directory. The Students table contains the following fields:
Which statement will retrieve only the first name, last name, and telephone number for every student listed in the directory?
- WHERE Students SELECT *
- SELECT firstName, lastName, telephoneNumber FROM Students
- SELECT firstName, lastName, telephoneNumber IN Students
- SELECT * FROM Students
- WHERE Students SELECT firstName, lastName, telephoneNumber
Explanation:Use SELECT…FROM and list the fields you want to retrieve.
-
HOTSPOT
For each of the following statements, select Yes if the statement is true. Otherwise, select No. Each correct selection is worth one point.
-
This question requires that you evaluate the underlined text to determine if it is correct.
The benefit of using a transaction when updating multiple tables is that the update cannot fail.
Select the correct answer if the underlined text does not make the statement correct. Select “No change is needed” if the underlined text makes the statement correct.
- No change is needed
- succeeds or fails as a unit
- finishes as quickly as possible
- can be completed concurrently with other transactions
Explanation:The benefit of using a transaction when updating multiple tables is that the update succeeds or fails as a unit.
-
What are two advantages of normalization in a database? (Choose two)
- prevents data inconsistencies
- reduces schema limitations
- minimizes impact of data corruption
- decreases space used on disk
-
HOTSPOT
For each of the following statements, select Yes if the statement is true. Otherwise, select No. Each correct selection is worth one point.
-
This question requires that you evaluate the underlined text to determine if it is correct.
Unit testing is the final set of tests that must be completed before a feature or product can be considered finished.
Select the correct answer if the underlined text does not make the statement correct. Select “No change is needed” if the underlined text makes the statement correct.
- No change is needed
- User acceptance
- System
- Integration
Explanation:User acceptance testing (UAT) is the last phase of the software testing process. During UAT, actual software users test the software to make sure it can handle required tasks in real-world scenarios, according to specifications.
UAT is one of the final and critical software project procedures that must occur before newly developed software is rolled out to the market.
UAT is also known as beta testing, application testing or end user testing.
-
You need to create a stored procedure that passes in a person’s name and age.
Which statement should you use to create the stored procedure?
- Option A
- Option B
- Option C
- Option D
Explanation:Example (nvarchar and int are best here):
The following example creates a stored procedure that returns information for a specific employee by passing values for the employee’s first name and last name. This procedure accepts only exact matches for the parameters passed.CREATE PROCEDURE HumanResources.uspGetEmployees
@LastName nvarchar(50),
@FirstName nvarchar(50)
ASSET NOCOUNT ON;
SELECT FirstName, LastName, JobTitle, Department
FROM HumanResources.vEmployeeDepartment
WHERE FirstName = @FirstName AND LastName = @LastName;
GO -
You have a SQL Server database named MyDB that uses SQL Server Authentication.
Which connection string should you use to connect to MyDB?
- Data Source=MyDB; UserID=username; Password=P@sswOrd; Initial Catalog=Sales
- Data Source=MyDB; Integrated Security=SSPI; Initial Catalog=Sales
- Data Source=MyDB; Integrated Security=True; Initial Catalog=Sales
- Data Source=MyDB; Trusted_Connection=True; MultipleActiveResultSets=True; Initial Catalog=Sales
Explanation:Integrated Security
Integrated Security is by default set to false.
When false, User ID and Password are specified in the connection.Incorrect:
not C: Windows Authentication (Integrated Security = true) remains the most secure way to log in to a SQL Server database. -
You are developing a database that other programmers will query to display race results.
You need to provide the ability to query race results without allowing access to other information in the database.
What should you do?
- Disable implicit transactions.
- place the query into a stored procedure.
- Create an index on the result table.
- Add an AFTER UPDATE trigger on the result table to reject updates.
-
This question requires that you evaluate the underlined text to determine if it is correct.
A piece of text that is 4096 bytes or smaller and is stored on and retrieved from the client computer to maintain state is known as a ViewState.
Select the correct answer if the underlined text does not make the statement correct. Select “No change is needed” if the underlined text makes the statement correct.
- No change is needed
- cookie
- form post
- QueryString
Explanation:A piece of text that is 4096 bytes or smaller and is stored on and retrieved from the client computer to maintain state is known as a Cookie.
-
This question requires that you evaluate the underlined text to determine if it is correct.
Internet Information Services (IIS) must be installed on the client computers in order to run a deployed ASP.NET application.
Select the correct answer if the underlined text does not make the statement correct. Select “No change is needed” if the underlined text makes the statement correct.
- No change is needed
- computer that hosts the application
- computer that you plan to deploy from
- Application Layer Gateway Service
Explanation:Internet Information Services (IIS) must be installed on computer that hosts the application in order to run a deployed ASP.NET application.
-
Which programming language is characterized as client-side, dynamic and weakly typed?
- JavaScript
- HTML
- ASP.NET
- C#
Explanation:JavaScript is characterized as a dynamic, weakly typed, prototype-based language with first-class functions. It is primarily used in the form of client-side JavaScript for the development of dynamic websites.
-
HOTSPOT
The ASP.NET MVC page lifecycle is shown in the following graphic:Use the drop-down menus to select the answer choice that completes each statement Each correct selection is worth one point.