Which test should you perform?
You are an enterprise application developer. You create a routing application that ascertains the best routes for shipment of containers.
The application contains a complex routing method that examines the following parameters:
* The weight of the containers
* The length of the trailer that hauls the containers
* Road constraints such as weight limits and bridge heights
The method returns a list of roads to use. You need to design a unit test to ensure that the routes returned do not violate any known constraints.
Which test should you perform?
Which action should you recommend?
You are an enterprise application developer. You are creating a sales application. You make several changes to a commission object within the sales application. The commission object calculates the monthly sales commissions for the sales force of the company. The sales commissions are calculated based on the following criteria:
* The commission object receives the following parameters:
The ID of the sales person
The monthly gross sales of the sales person
* The commission object calls the data access layer to execute three stored procedures.
* The commission object calculates the commission by performing operations on the output of the stored procedures.
You need to write a unit test for the commission object.
Which action should you recommend?
Which three test scenarios should you recommend?
You are an enterprise application developer. You are designing unit tests for a Customer class. The Customer class contains properties to get or set data in private fields. The Customer class also contains one default constructor and one non-default constructor. The non-default constructor accepts a Customer ID argument. When the non-default constructor is used to instantiate the Customer object, a public method named Load is invoked along with the Customer ID argument. The Customer object properties are then loaded by using values from the database. You need to design unit tests that will test the class properties.
Which three test scenarios should you recommend? (Each correct answer presents part of the solution. Choose three.)
Which two additional data should you use?
You are an enterprise application developer. You create a Web-based application and deploy it to your customers. The application requires the users to log on to use the application. The application does not permit impersonation. The application also requires the users to connect to the database and to a folder in the Web server. Your customers report a security bug. The bug denies access to the logged-on users every time they try to upload a file to the folder in the Web server.
Your customers provide you with the following data to reproduce the bug:
* The version of the Web-based application
* The users steps in the Web-based application
* The version of the operating system
You find that the information is insufficient to reproduce the bug. You need to identify the additional information that is required to reproduce the bug.
Which two additional data should you use? (Each correct answer presents part of the solution. Choose two.)
Which component should you choose?
You are an enterprise application developer. You are testing authentication in a Microsoft Windows-based application.
After the user enters the user name and password in the logon form of the user interface component, the following responses are triggered:
* The user interface component passes the user name and password to a utility component that performs the encryption.
* The user interface component then passes the encrypted user name and password to a Web service.
* The Web service invokes a business component and passes the encrypted user name and password.
* The business component passes the encrypted user name and password to a data access layer component that validates the user.
You need to identify the component on which the business component depends.
Which component should you choose?
What should you recommend?
You are an enterprise application developer. You are performing a peer code review for an entry- level developer. The developer is implementing server-side business objects. The business objects must be accessed and activated by using .NET Framework remoting. In addition, the business objects must meet the following requirements:
* Implement an interface for client-side access.
* Inherit from a base business object class.
The developer writes the following code segment.
public class UserObject : BaseBizObject, MarshalByRefObject, IUserObject { }
When the developer attempts to compile the code, an error message is received. You need to review the code and recommend a solution.
What should you recommend?
What should you recommend?
You are an enterprise application developer. You create a Microsoft Windows client application that communicates with a business layer component. The business layer component contains the following class, named Utility.
public class Utility
{
public Utility()
{
}
public void ChangeData()
{
}
}
The application must fulfill the following criteria:
* Instances of the Utility class must be created only within the business component.
* The Windows client application must be able to invoke the functions inside the Utility class.
You review the code for the Utility class and decide it requires modification. You need to recommend modifications for the code.
What should you recommend?
Which approach should you choose?
You are an enterprise application developer. You are creating a component that stores employee details in a Microsoft SQL Server database. The component is implemented as a class. The class includes the public properties ID and Name. The class does not contain static methods. Both the ID field and the Name field are required in the Employee table of the database. Serialized instances of the class can be returned by XML Web services. You need to ensure that the class supports XML serialization. You also need to minimize the possibility of a developer creating a class instance by using partial data.
Which approach should you choose?
What should you do?
You are an enterprise application developer. You are creating a component that encapsulates database access to an employee table. The component contains a method that retrieves an employee record by using a string input parameter.
You need to respond to error conditions in a way that meets the following requirements:
* If the caller passes a variable that fails to reference a string object, the caller receives an error notice.
* If the caller fails to respond to the error notice, the error condition forcefully alters the flow of execution.
* If the error occurs on the main thread, the application is terminated.
What should you do?
Which two actions should you perform?
You are an enterprise application developer. You create a component that uses unmanaged resources. You need to ensure that the component permits client developers to release the unmanaged resources as soon as they are no longer needed. You also need to guarantee that unmanaged resources are always released, even if a client developer fails to release them.
Which two actions should you perform? (Each correct answer presents part of the solution. Choose two.)