Which code segment should you use?
You create Web-based client applications. You are creating an application that must access different databases depending on whether the application is in demonstration, production, or test mode. The mode is stored in an environment variable. The configuration file contains the following settings.
<connectionStrings>
<add name = “ProdDB” connectionString = “Data Source = server; Initial Catalog = ProdDatabase; Integrated_Security = true” providerName = “System.Data.SqlClient” /> <add name = “DemoDB” connectionString = “Data Source = server; Initial Catalog = DemoDatabase; Integrated_Security = true” providerName = “System.Data.SqlClient” /> <add name = “TestDB” connectionString = “Data Source = server; Initial Catalog = TestDatabase; Integrated_Security = true”
providerName = “System.Data.SqlClient” />
</connectionStrings>
You need to ensure that changing the mode will not require you to change the configuration file. Which code segment should you use?
Which analysis strategy should you use?
You create Web-based client applications. You deploy an application for a company. The application enables customers to access mobile phone invoices. Users report that the application fails to respond and time-outs occur. You test the application and find that the reports are valid. You need to identify the cause of the problem. Which analysis strategy should you use?
What should you conclude?
You create Web-based applications. You are creating an application for purchase order management. The application is composed of a Web client, business logic components, a Data Access Component (DAC) Web service, and a central database.
The application design meets the following specifications:
The Web-based client application is used for end-user interaction. The Web-based client application uses two business logic components named Order and Customer.
Each customer can have multiple orders.
Each order belongs to a single customer.
The business logic components use a DAC Web service.
The business logic components make data available to the Web-based client application.
You receive a deployment diagram as shown in the following exhibit. (Refer to the Exhibit.) You need to evaluate the diagram to ensure that it complies with the specifications. What should you conclude?
What should you do?
You create Web-based client applications. The application permits users to upload files to a network share. When anonymous users use the upload feature from the Web-based application, a custom error page is displayed. You need to ensure that anonymous users are able to use the application. What should you do?
Which two actions should you perform?
You create Web-based client applications. You create a Web-based application for your company. Partner companies will also access the application. You evaluate the deployment plan as shown in the following exhibit. (Refer to the Exhibit.) Company policy states that permission is required to open port 80 and port 443 on the company firewall. The ports are to be opened only to specified servers. This policy applies to the firewall that separates the red zone from the perimeter network. This policy also applies to the firewall that separates the perimeter network from the intranet. Port 80 is already open in the outer firewall. You need to modify the deployment plan to meet the company policy. Which two actions should you perform? (Each correct answer presents part of the solution. Choose two.)
Which code segment should you use?
You create Web-based client applications. You are creating a class named Product. The Product class will be used by a Web-based application to retrieve and modify product information.
When you create an instance of the Product class, you retrieve the current information from the Products table. The Product class contains a static member named CreateNewProduct. The CreateNewProduct method is used to add a new product to the database and return the primary key.
The Products table contains the following fields:
ProductID (primary key)
ProductName
Description
CategoryID
CurrentPrice
You need to create the constructor for the Product class. Which code segment should you use?
What should you do?
You create Web-based client applications. You are creating a business logic component. The component has to pass any exception exactly as received to the Web Form procedure that calls the component. The component also has to attach the custom information to the caught exception before the custom information is passed to the Web Form procedure. You need to ensure that the component permits the consumer to deal with the exception by using the least coding effort. What should you do?
Which set of associations should you identify?
You create Web-based client applications. You create an e-commerce application. Users are permitted to customize the application. All user settings and product information of the application are stored in a database. The class diagram for the application is as shown in the Exhibit. (Refer to the Exhibit.) You need to identify the correct logical layer in which each class resides based on the class diagram. Which set of associations should you identify?
Which design should you choose?
You create Web-based client applications.
You are creating a class library. The class library will be used to read and write data in the following three tables that are located in the Northwind database:
Customers
Orders
OrderDetails
The structure of the three tables is shown in the following diagram. (Refer to the Exhibit.) You need to ensure that the interfaces of the three classes accurately represent the connections between the tables in the database. Which design should you choose?
Which code segment should you use?
You create components for Web-based client applications. You are creating a BankAccount class. The BankAccount class contains an AccountNumber property and a CreateAccount method. The CreateAccount method is used to create a new account. The method generates a unique random value for the actNumber field. You need to ensure that the BankAccount class is extendable, and that it serves as the base class for other derived classes. You also need to ensure that each derived class can have its own guidelines to generate account numbers in the CreateAccount method. Which code segment should you use?