What should you recommend?
You are an enterprise application developer. Your team has created a distributed application that permits users to generate reports. The reports aggregate data from existing databases. You must move your new application into a test environment. You propose the following criteria:
* Compile the application components in release mode.
* Publish the ASP.NET files to the test Web server.
* Install the serviced components in component services on the application server.
* Backup the development database and restore it on the test database server.
You need to evaluate the proposal and recommend accordingly. What should you recommend?
Which three sets of unit tests should you write?
You are an enterprise application developer. You are designing unit test cases for an account management system of a regional bank. Before creating the application, you create the unit test scenarios by using use cases.
Three high-level use cases are outlined as shown in the following exhibit.
You need to write unit tests to test the functionality inside the system. Which three sets of unit tests should you write? (Each correct answer presents part of the solution. Choose three.)
Which code segment should you use?
You have an SQL query that takes one minute to execute. You use the following code segment to execute the SQL query asynchronously.
Dim ar As IAsyncResult = cmd.BeginExecuteReader()
You need to execute a method named DoWork() that takes one second to run while the SQL query is executing. DoWork() must run as many times as possible while the SQL query is executing. Which code segment should you use?
Which class should you choose?
You are an enterprise application developer. You create a Web service that wraps a business component to expose it through the Web. The business component contains two classes, the Utility class and the Facade class. The Utility class has private methods and internal methods. The Facade class has public methods. The Web service component has a Web service class that is named Services. The Services class performs security verification before the functions in the business component are called. The Services class relies on a class that is named Security in the Web service to implement the security verification. You have completed unit testing both components. You need to choose the class for which to write test cases for integration testing.
Which class should you choose?
What should you do?
You are deploying a Web site to a server managed by a hosting company. The only access you have to the server is through FTP. You need to precompile and deploy the Web site without its source files. What should you do?
What should you conclude and recommend?
You are an enterprise application developer. You are manipulating a collection of customer, product, and supplier objects.
The collection objects must fulfill the following requirements:
* The objects must use custom sort methods on different properties of the respective classes.
* The objects must be strongly typed.
A developer from your team decides to use the following collection classes.
abstract class MyCollectionBase : System.Collections.CollectionBase
{
abstract public void Sort();
}
public class CustomerCollection : MyCollectionBase
{
//Code overriding CollectionBase methods
public override void Sort()
{
//Customer sorting code
}
}
public class SupplierCollection : MyCollectionBase
{
//Code overriding CollectionBase methods
public override void Sort()
{
//Supplier sorting code
}
}
public class ProductCollection : MyCollectionBase
{
//Code overriding CollectionBase methods
public override void Sort()
{
//Product sorting code
}
}
You need to review the code and recommend improvements to simplify maintenance, if necessary. What should you conclude and recommend?
Which two actions should you perform?
You are creating a custom user control. The custom user control will be used on 10 Web Forms for an ASP.NET Web site that allows users to register and log on to a personalized experience. The custom user control uses two TextBox controls and two Button controls. You need to ensure that the controls are visible only when users are not logged on to the Web site. You also need to minimize the amount of effort in development and maintenance for the Web site. Which two actions should you perform? (Each correct answer presents part of the solution. Choose two.)
What should you conclude and recommend?
You are an enterprise application developer. You create a data access layer for an order processing application.
The data access layer meets the following criteria:
* The data access layer contains a GetConnectionString method to retrieve and return the connection string for the database.
* The data access layer contains a stored procedure named GetTotalOrderAmount.
* The stored procedure runs a select query to return only the sum of the OrderAmount column for the active orders. At times, there might be no active orders.
You create the following method to execute the stored procedure and return the total.
public double GetTotalOrderAmount()
{
SqlConnection con = new SqlConnection(GetConnectionString()); string sql = GetTotalOrderAmount;
SqlCommand cmd = new SqlCommand(sql,con);
IDataReader rd; con.Open(); rd = cmd.ExecuteReader(); double amt = 0.0;
if (rd.Read())
{
amt = rd.GetDouble(0);
}
rd.Close();
con.Close();
return amt;
}
You need to review the code and recommend modifications to simplify the code and improve performance, if necessary. What should you conclude and recommend?
What should you do?
You create a Web site that you must copy from a development server to a testing server, along with all source files. You do not have terminal access to the testing server. You need to create the virtual directory. Then you must copy the Web site to the virtual directory on the testing server without precompiling the site. What should you do?
Which object should you choose?
You are an enterprise application developer. You create a distributed application that transfers data across tiers. The application transfers multiple rows of data per transaction to business components through a Microsoft .NET Framework remoting channel. The application binds this data to user interface components. The .NET Framework remoting channel is configured to use binary serialization.
After the data is retrieved from the data source, the data is not changed. The distributed application must meet the following criteria:
* Consume minimum memory for any data location.
* Make minimum use of the processor for any data location.
You need to identify the type of object to serialize. Which object should you choose?