|
Question |
Rating |
View Answer |
|
You use Visual Studio .NET to develop applications for your human resources department. You create the following interfaces: Public Interface IEmployee Property Salary() As Double End Interface Public Interface IExecutive Inherits IEmployee Property AnnualBonus() As Double End Interface The IEmployee interface represents a generic Employee concept. All actual employees in your company should be represented by interfaces that are derived from IEmployee. Now you need to create a class named Managed to represent executives in your company. You want to create this class by using the minimum amount of code. You write the following code: Public Class Manager End class Which additional code segment or segments should you include in Manager? (Choose all that apply) A. Implements IExecutive B. Implements IEmployee, IExecutive C. Inherits IExecutive D. Inherits IEmployee, IExecutive E. Property Salary() As Double Implements IExecutive.Salary F. Property AnnualBonus() As Double Implements _ IExecutive.AnnualBonus
|
|
View Answer |
|
You develop a Windows-based application XYZApp that includes several menus. Every top-level menu contains several menu items, and certain menus contain items that are mutually exclusive. You decide to distinguish the single most important item in each menu by changing its caption text to bold type. What should you do? A. Set the DefaultItem property to True. B. Set the Text property to <b>True</b>. C. Set the Checked property to True. D. Set the OwnerDraw property to True.
|
|
View Answer |
|
You create a Visual Studio .NET setup project to distribute an application. You add a SQL script named XYZDB.SQL. You must ensure that the SQL script is executed during the installation process. What should you do? A. Add a custom action to your setup project. Select XYZDB.SQL as the source path. B. Add a batch file to your setup project to execute XYZDB.SQL. Add a launch condition to the setup project. Set the Condition property to the batch file. C. Create a new Visual Studio .NET project that executes XYZDB.SQL. Include the new project with your setup project. Add a custom action that launches the new project during installation. D. Add a launch condition to your setup project. Set the Condition property to XYZDB.SQL.
|
|
View Answer |
|
You develop a Windows-based application. The application uses a DataSet object that contains two DataTable objects. The application will display data from the two data tables. One table contains customer information, which must be displayed in a data-bound ListBox control. The other table contains order information, which must be displayed in a DataGrid control. You need to modify your application to enable the list box functionality. What should you do? A. Use the DataSet.Merge method. B. Define primary keys for the DataTable objects. C. Create a foreign key constraint on the DataSet object. D. Add a DataRelation object to the Relation collection of the DataSet object.
|
|
View Answer |
|
You use Visual Studio .NET to create a Windows-based application called XYZMortage. The main form of the application contains several check boxes that correspond to application settings. One of the CheckBox controls is named advancedCheckBox. The caption for advancedCheckBox is Advanced. You must enable users to select or clear this check box by pressing ALT+A. Which two actions should you take? (Each correct answer presents part of the solution. Choose two) A. Set advancedCheckBox.AutoCheck to True. B. Set advancedCheckBox.AutoCheck to False. C. Set advancedCheckBox.Text to &Advanced. D. Set advancedCheckBox.Tag to &Advanced. E. Set advancedCheckBox.CheckState to Unchecked. F. Set advancedCheckBox.CheckState to Indeterminate. G. Set advancedCheckBox.Apperance to Button. H. Set advancedCheckBox.Apperance to Normal.
|
|
View Answer |
|
You develop an application that enables users to enter and edit purchase order details. The application includes a Windows Form named DisplayXYZForm. The application uses a client-side DataSet object to manage data. The DataSet object contains a Data Table object named XYZDetails. This object includes one column named Quantity and another named UnitPrice. For each item on a purchase order, your application must display a line item total in a DataGrid control on DisplayXYZForm. The line item is the product of Quantity times UnitPrice. Your database design does not allow you to store calculated values in the database. You need to add code to your Form_Load procedure to calculate and display the line item total. Which code segment should you use? A. Dim totalColumn As New DataColumn("Total", _ Type.GetType("System.Decimal")) XYZDetails.Columns.Add(totalColumn) totalColumn.Expression = "Quantity * UnitPrice" B. Dim totalColumn As New DataColumn("Total", _ Type.GetType("System.Decimal")) XYZDetails.Columns.Add(totalColumn) totalColumn.Equals("Quantity * UnitPrice") C. XYZDetails.DisplayExpression("Quantity * UnitPrice") D. XYZDetails.DisplayExpression("quantityColumn + _ unitPriceColumn")
|
|
View Answer |
|
You plan to use Visual Studio .NET to create a class named BusinessRules, which will be used by all applications in your company. BusinessRules defines business rules and performs calculations based on those rules. Other developers in your company must not be able to override the functions and subroutines defined in BusinessRules with their own definitions. Which two actions should you take to create BusinessRules? (Each correct answer presents part of the solution. Choose two) A. Create a Windows control library prokect B. Create a class library project. C. Create a Windows Service project. D. Use the following code segment to define BusinessRules: Protected Class BusinessRules E. Use the following code segment to define BusinessRules: Public Shadows Class BusinessRules F. Use the following code segment to define BusinessRules: Public NotInheritable Class BusinessRules G. Use the following code segment to define BusinessRules: Public MustInherit Class BusinessRules
|
|
View Answer |
|
You develop a Windows-based application. Its users will view and edit employee attendance data. The application uses a DataSet object named customDataSet to maintain the data while users are working with it. After a user edits data, business rule validation must be performed by a middle-tier component named myComponent. You must ensure that your application sends only edited data rows from customDataSet to myComponent. Which code segment should you use? A. Dim changeDataSet As New DataSet If customDataSet.HasChanges _ Then myComponent.Validate(changeDataSet) B. Dim changeDataSet As New DataSet If customDataSet.HasChanges _ Then myComponent.Validate(customDataSet). C. Dim changeDataSet AS DataSet = customDataSet.GetChanges() myComponent.Validate(changeDataSet) D. Dim changeDataSet As DataSet = customDataSet.GetChanges() myComponent.Validate(customDataSet)
|
|
View Answer |
|
Your company uses Visual Studio .NET to create a Windows-based application for XYZ. The application is named CustomerTracker, and it calls an assembly named Schedule. Six months pass. The hospital asks your company to develop a new Windows-based application. The new application will be named EmployeeTracker, and it will also call Schedule. Because you anticipate future revisions to this assembly, you want only one copy of Schedule to serve both applications. Before you can use Schedule in EmployeeTracker, you need to complete some preliminary tasks. Which three actions should you take? (Each correct answer presents part of the solution. Choose three) A. Create a strong name for Schedule. B. Use side-by-se execution to run Schedule. C. Install Schedule in the global assembly cache. D. Move Schedule to the WindowsSystem32 folder. E. Create a reference in EmployeeTracker to Schedule. F. Create a reference in EmployeeTracker to CustomerTracker.
|
|
View Answer |
|
You use Visual Studio .NET to create a Windows-based application. The application includes a form named XYZ. You implement print functionality in XYZ by using the native .NET System Class Libraries. XYZ will print a packing list on tractor-fed preprinted forms. The packing list always consists of two pages. The bottom margin of page 2 is different from the bottom margin of page 1. You must ensure that each page is printed within the appropriate margins. What should you do? A. When printing page 2, set the bottom margin by using the PrintPageEventArgs object. B. When printing page 2, set the bottom margin by using the QueryPageSettingEventArgs object. C. Before printing, set the bottom margin of page 2 by using the PrintSetupDialog object. D. Before printing, set the bottom margin of page 2 by using the PrinterSettings object
|
|
View Answer |
|
You use Visual Studio .NET to develop a Windows-based application that will manager vendor contracts. You create a DataSet object, along with its associated DataTable object and DataView object. The DataSet object contains all data available for a single contract. This data is displayed in a DataGrid control. After all parties sign a contract, the value in a field named ContractEXApproved is set to True. Business rules prohibit changes to database information about a contract when the ContractEXApproved value associated with the contract is true. You must ensure that this business rule is enforces by your application code. What should you do? A. Set the AllowNew property of the DataSet object to False. B. Set the AllowEdit property of the DataView object to False. C. Call the EndEdit method of the DataTable object. D. Call the EndEdit method of the DataRow object.
|
|
View Answer |
|
You develop a Windows-based application that contains a class named Contact. Contact contains an event named ContactSaved. Many Contact objects will be created from the Contact class and inserted into an array named Contacts. You create a custom method named HandleContactSaved in your application. You must ensure that your application calls HandleContactSaved whenever the ContactSaved event is fired for any of the Contact objects. What should you do? A. Use the WithEvents keyword to declare each Contact object. Add each Contact object to the Contacts array as it is created. B. Add each Contact object to the Contacts array as it is created Add the Handles keyword to HandleContactSaved. C. Add each Contact object to the Contacts array as it is created. Assign HandleContactSaved to the Handle property of the HandleRef structure. D. Add each Contact Object to the Contacts array as it is created. Call the AddHandler statement and pass the new Contact object and the address of HandleContactSaved.
|
|
View Answer |
|
You develop a customer contact application XYZContact, that will enable users to view and update customer data in a Windows Form. Your application uses a DataTable object and a DataAdapter object to manage the data and interact with a central database. Your application design must fulfill the following requirements: After a user completes a set of updates, the changes must be written in the database. The data stored in the DataTable object must indicate that the database updates are complete. What code segment should you use? A. DataTable.AcceptChanges() DataAdapter.Update(DataTable) B. DataAdapter.Update(DataTable) DataTable.AcceptChanges() C. DataTable.Reset() DataAdapter.Update(DataTable) D. DataAdapter.Update(DataTable) DataTable.Reset().
|
|
View Answer |
|
You create an assembly by using Visual Studio .NET. The assembly is consumed by other .NET applications to manage the creation and deletion of XML data files. The assembly includes a method named DeleteXYZXMLFile that uses the Win32 API to delete the XML data files. A security exception is thrown when DeleteXYZXMLFile is called from another .NET application. You must modify DeleteXMLFile to ensure that this method can execute functions exposed by the Win32 API. To do so, you create a SecurityPermission object that represents the right to call unmanaged code. Which method of the SecurityPermission object should you call? A. Assert B. Demand C. PermitOnly D. RevertDeny
|
|
View Answer |
|
You use Visual Studio .NET to create a Windows-based application. The application includes a form named ConfigurationForm. ConfigurationForm contains 15 controls that enable users to set basic configuration options for the application. You design these controls to dynamically adjust when users resize ConfigurationForm. The controls automatically update their size and position on the form as the form is resized. The initial size of the form should be 650 x 700 pixels. If ConfigurationForm is resized to be smaller then 500 x 600 pixels, the controls will not be displayed correctly. You must ensure that users cannot resize ConfigurationForm to be smaller than 500 x 600 pixels. Which two actions should you take to configure ConfigurationForm? (Each correct answer presents part of the solution. Choose two.) A. Set the MinimumSize property to 500,600. B. Set the MinimumSize property to 650,700. C. Set the MinimizeBox property to True. D. Set the MaximumSize property to 500,600. E. Set the MaximumSize property to 650,700. F. Set the MaximizeBox property to True. G. Set the Size property to 500,600. H. Set the Size property to 650,700.
|
|
View Answer |
|
You develop a Windows-based application for your payroll department. The application will include a procedure named Signin, which must allow users to report that they are present in their offices. The procedure must also allow each user to sign in other users. The procedure must return a Boolean variable indicating success or failure. In most cases, the procedure will be called with no parameters. When no parameters are passed in, the procedure should recognize the user by the information stored in global variables. When one user signs in another user, the procedure should accept a string variable parameter that represents the user name of the user who is signed in. You want to define your procedure to present the most efficient contract to the consumer. Which two code segments should you use? (Each correct answer presents part of the solution. Choose two) A. Public Function SignIn() As Boolean. B. Public Function SignIn(userName As String) As Boolean C. Public Function SignIn(userName As String, _. Success As Boolean) As Boolean D. Public Function SignInWithName(userName As String) _ As Boolean E. Public SignIn(username As String) F. Public Sub SignInWithName(userName As String)
|
|
View Answer |
|
You develop a Windows-based application called XYZApplication by using Visual Studio .NET. XYZApplication receives XML data files from various external suppliers. An XML Schema file defines the format and the data types for the XML data files. XYZApplication must parse the incoming XML data files to ensure that they conform to the schema. What should you do? A. Implement a DataSet object and code an event handler to process its events. B. Implement a DataSet object and set its Enforce Constraints property to True. C. Implement an XmlValidatingReader object and code an event handler to process its events. D. Implement an XmlValidatingReader object and examine its ReadState property after reading the XML data file.
|
|
View Answer |
|
Question: 10. (A) As a developer at XYZ you develop a new sales analysis application that reuses existing data access components. One of these components returns a DataSet object that contains the data for all customer orders for the previous year. You want your application to display orders for individual product numbers. Users will specify the appropriate product numbers at run time. What should you do? A. Use the DataSet.Reset method. B. Set the RowFilter property of the DataSet object by using a filter expression. C. Create a DataView object and set the RowFilter property by using a filter expression. D. Create a DataView object and set the RowStateFilter property by using a filter expression..
|
|
View Answer |
|
Your development team uses Visual Studio .NET to create an accounting application, which contains a class named XYZAccounts. This class instantiates several classes from a COM component that was created by using Visual Basic 6.0 Each COM component class includes a custom method named ShutDownObject that must be called before terminating references to the class. Software testers report that the COM component appears to remain in memory after the application terminates. You must ensure that the ShutDownObject method of each COM component class is called before XYZAccounts is terminated. What should you do? A. Add code to the Terminate event of XYZAccounts to call the ShutDownObject method of each COM component class. B. Find each location in your code where a reference to XYZAccounts is set to Nothing or goes out of scope. Add code after each instance to manually invoke the Visual Studio .NET garbage collector. C. Add the procedure Protected Overrides Finalize()to XYZi ngAccounts. Add code to the procedure to call the ShutDownObject method of each COM component class. D. Add the procedure Private Sub Finally()to XYZAccounts. Add code to the procedure to call the ShutDownObject method of each COM component class.
|
|
View Answer |
|
You use Visual Studio .NET to create a Windows-based application. On the main application form, XYZFormMain, you create a TextBox control named textConnectionString. Users can enter a database connection string in this box to access customized data from any database in your company. You also create a Help file to assist users in creating connection strings. The Help file will reside on your company intranet. Your application must load the Help file in a new browser window when the user presses F1 key, but only of textConnectionString has focus. You must create this functionality by using the minimum amount of code. In which event should you write the code to display the Help file? A. textConnectionString_KeyPress B. textConnectionString_KeyDown C. textConnectionString_KeyUp D. textConnectionString_GiveFeedback. E. textConnectionString HelpRequested
|
|
View Answer |