|
Question |
Rating |
View Answer |
|
You use Visual Studio .NET to create a Windows-based application for online gaming. Each user will run the client version of the application on his or her local computer. In the game, each user controls two groups of soldiers, Group1 and Group2. You create a top-level menu item whose caption is Groups. Under this menu, you create two submenus. One is named group1Submenu, and its caption is Group 1. The other is named group2Submenu, and its caption is Group 2. When the user select the Groups menu, the two submenus will be displayed. The user can select only one group of soldiers at a time. You must ensure that a group can be selected either by clicSheets the appropriate submenu item or by holding down the ALT key and pressing 1 or 2. You must also ensure that the group currently select will be indicated by a dot next to the corresponding submenu item. You do not want to change the caption text of any of your menu items. Which four actions should you take? (Each correct answer presents part of the solution. Choose four) A. Set group1Submenu.Text to “Group &1”. Set group2Submenu.Text to “Group &2”. B. Set Group1.ShortCut to “ALT1”. Set Group2.ShortCut to “ALT2”. C. In the group1Submenu.Click event, place the following code segment: group1Submenu.DefaultItem = true; In the group2Submenu.Click event, place the following code segment: group2Submenu.DefaultItem = true; D. In the group1Submenu.Click event, place the following code segment: group2Submenu.DefaultItem = false; In the group2Submenu.Click event, place the following code segment: group1Submenu.DefaultItem = false; E. In the group1Submenu.Click event, place the following code segment: group1Submenu.Checked = true; In the group2Submenu.Click event, place the following code segment: group2Submenu.Checked = true; F. In the group1Submenu.Click event, place the following code segment: group2Submenu.Checked = false; In the group2Submenu.Click event, place the following code segment: group1Submenu.Checked = false; G. Set group1Submenu.RadioCheck to True. Set group2Submenu.RadioCheck to True. H. Set group1Submenu.RadioCheck to False. Set group2Submenu.RadioCheck to False.
|
|
View Answer |
|
You use Visual Studio .NET to create a Windows-based application. The application includes a form named XYZForm. XYZForm contains 15 controls that enable users to set basic configuration options for the application. You design these controls to dynamically adjust when users resize XYZForm. The controls automatically update their size and position on the form as the form is resized. The initial size of the form should be 659 x 700 pixels.. If ConfigurationForm is resized to be smaller than 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 XYZForm? (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 MaximumBox property to True. G. Set the Size property to “500,600”. H. Set the Size property to “650,700”.
|
|
View Answer |
|
Another developer in your company uses Visual Studio .NET to create a component named XYZiComponent. You deploy XYZiComponent to a server. When you execute XYZiComponent, you receive the following error message: "System.Security.Policy.PolicyException: Failed to acquire required permissions." As quickly as possible, you need to discover which permissions are required by XYZiComponent. What should you do? A. Request the source code from the developer who created My Component. Examine the source code to find the required permissions. B. Run the Microsoft CLR Debugger (DbgCLR.exe) on the server to view the permissions requested by the application at run time. C. Run the Runtime Debugger (Cordbg.exe) on the server to view the permissions requested by the application at run time. D. Run the Permissions View tool (Permview.exe) on the server to view the permissions required by XYZiComponent. E. Run the MSIL Disassembler (IIdasm.exe) on the server to view permissions requested by XYZiComponent that were denied.
|
|
View Answer |
|
You work as software developer at XYZ inc. You need to develop a Windows form that provides online help for users. You want the help functionality to be available when users press the F1 key. Help text will be displayed in a pop-up window for the text box that has focus. To implement this functionality, you need to call a method of the HelpProvider control and pass the text box and the help text. What should you do? A. SetShowHelp B. SetHelpString C. SetHelpKeyword D. ToString
|
|
View Answer |
|
You use Visual Studio .NET to create a Windows-based application. The application includes a form named XYZProcedures (EXP). EXP allows users to enter very lengthy text into a database. When users click the Print button located on EXP, this text must be printed by the default printer. You implement the printing functionality by using the native .NET System Class Libraries with all default settings. Users report that only the first page of the text is being printed. How should you correct this problem? A. In the BeginPrint event, set the HasMorePages property of the PrintEventArgs object to True. B. In the EndPrint event, set the HasMorePages property of the PrintEventArgs object to True. C. In the PrintPage event, set the HasMorePages property of the PrintPageEventArgs object to True. D. In the QueryPageSettings event, set the HasMorePages property of the QueryPageSettingEventArgs object to True.
|
|
View Answer |
|
You use Visual Studio .NET to develop a Windows-based application called XYZApp. Your application will display customer order information from a Microsoft SQL Server database. The orders will be displayed on a Windows Form in a data grid named DataGrid1. DataGrid1 is bound to a DataView object. The Windows Form includes a button control named displayBackOrder. When users click this button, DataGrid1 must display only customer orders whose BackOrder value is set to True.. How should you implement this functionality? A. Set the RowFilter property of the DataView object to "BackOrder = True". B. Set the RowStateFilter property of the DataView object to "BackOrder = True". C. Set the Sort property of the DataView object to "BackOrder = True". D. Set the ApplyDefaultSort property of the DataView object to True.
|
|
View Answer |
|
You develop a Windows-based application to manage business contacts. The application retrieves a list of contacts from a central database called XYZDB. The list of contacts is managed locally in a DataSet object named contactDataSet. To set the criteria for retrieval, your user interface must enable users to type a city name into a TextBox control. The list of contacts that match this name must then be displayed in a DataGrid control. Which code segment should you use? A. DataView contactDataSet = new DataView(); dv.Table = contactDataSet.Tables[0]; dv.RowFilter = TextBox1.Text; DataGrid1.DataSource = dv; B. DataView dv = new DataView(); dv.Table = contactDataSet.Tables[0]; dv.RowFilter = String.Format(“City = ‘{0}’”, TextBox1.Text); DataGrid1.DataSource = dv; C. DataView contactDataSet = new DataView(); dv.Table = contactDataSet.Tables[0]; dv.Sort = TextBox1.Text; DataGrid1.DataSource = dv;. D. DataView dv = new DataView(); dv.Table = contactDataSet.Tables[0]; dv.Sort = String.Format(“City = ‘{0}’”, TextBox1.Text); DataGrid1.DataSource = dv;
|
|
View Answer |
|
You plan to develop a customer information application CustomEX that uses a Microsoft SQL Server database. CustomEX will be used frequently by a large number of users. Your application code must obtain the fastest possible performance when accessing the database and retrieving large amounts of data. You must accomplish this goal with the minimum amount of code. How should you design CustomEX? A. Use classes in the System.Data.OleDb namespace. B. Use classes in the System.Data.SqlClient namespace. C. Use remoting to connect to the SQL Server computer. D. Use interoperability to include legacy COM-based data access components.
|
|
View Answer |
|
You are a developer for a XYZ Inc that provides free software over the Internet. You are developing en e-mail application that users all over the world can download. The application displays text strings in the user interface. At run time, these text strings must appear in the language that is appropriate to the locale setting of the computer running the application. You have resources to develop versions of the application for only four different cultures. You must ensure that your application will also be usable by people of other cultures. How should you prepare the application for deployment? A. Package a different assembly for each culture. B. Package a different executable file for each culture. C. Package a main assembly for source code and the default culture. Package satellite assemblies for the other cultures. D. Package a main assembly for source code. Package satellite assemblies for each culture.
|
|
View Answer |
|
Your XYZ project team uses Visual Studio .NET to create an accounting application. Each team member uses the Write method of both the Debug class and the Trace class to record information about application execution in the Windows 2000 event log.. You are performing integration testing for the application. You need to ensure that only one entry is added to the event log each time a call is made to the Write method of either the Debug class or the Trace class. What are two possible code segments for you to use? (Each correct answer presents a complete solution. Choose two) A. EventLogTraceListener myTraceListener = new EventLogTraceListener(“myEventLogSource”); B. EventLogTraceListener myDebugListener = new EventLogTraceListener(“myEventLogSource”); Debug.Listeners.Add(myDebugListener); C. EventLogTraceListener myTraceListener = new EventLogTraceListener(“myEventLogSource”); Debug.Listeners.Add(myTraceListener); Trace.Listeners.Add(myTraceListener); D. EventLogTraceListener myDebugListener = new EventLogTraceListener(“myEventLogSource”); EventLogTraceListener myTraceListener = new EventLogTraceListener(“myEventLogSource”); Debug.Listeners.Add(myDebugListener); Trace.Listeners.Add(myTraceListener);
|
|
View Answer |
|
You use Visual .NET to develop a Windows-based application whose project name is XYZMgmt. You create an application configuration file that will be installed on the client computer along with XYZMgmt. You must ensure that the settings in the application configuration file are applied when XYZMgmt is executed. What should you do? A. Name the configuration file XYZMgmt.exe.confing and copy it to the WindowsSystem32 folder. B. Name the configuration file XYZMgmt.config and copy it to the WindowsSystem32 folder. C. Name the configuration file XYZMgmt.exe.config and copy it to the application folder. D. Name the configuration file XYZMgmt.config and copy it to the application folder. E. Name the configuration file XYZMgmt.exe.config and copy it to the global assembly cache.
|
|
View Answer |
|
You use Visual Studio .NET to create an application named ComapanyClient. Another developer in your company creates a component named ComapanyComponent. Your application uses namespaces exposed by ComapanyComponent. You must deploy both ComapanyClient and ComapanyComponent to several computers in your company’s accounting department. You must also ensure that ComapanyComponent can be used by future client applications. What are three possible ways to achieve your goal? (Each correct answer presents a complete solution. Choose three). A. Deploy ComapanyClient and ComapanyComponent to a single folder on each client computer. Each time a new client application is developed, place the new application in its own folder and copy ComapanyComponent to the new folder. . Deploy ComapanyClient and ComapanyComponent to a single folder on each client computer. Each time a new client application is developed, place the new application in its own folder. Edit ComapanyClient.exe.config and add a privatePath tag that points to the folder where ComapanyComponent is located. C. Deploy ComapanyClient and ComapanyComponent to separate folders on each client computer. In each client application that will use ComapanyComponent, add the following code segment: using ComapanyComponent; D. Deploy ComapanyClient and ComapanyComponent to separate folders on each client computer. Each time a new client application is developed, select Add Reference from the Tools menu and add a reference to ComapanyComponent. E. Deploy ComapanyClient and Tes tSheetsComponent to separate folders on each client computer. Register ComapanyComponent on each client computer by using the RegSvr32 utility. F. Deploy ComapanyClient and ComapanyComponent to separate folders on each client computer. Add ComapanyComponent to the global assembly cache.
|
|
View Answer |
|
You use Visual Studio .NET to develop a Windows-based application. The application will implement a role-based authorization scheme that is based on a Microsoft SQL Server database of user names. Users will enter their user names in a text box named userName and logon screen. You must ensure that all users are assigned the Supervisor rule and the EX role by default. Which code segment should you use? A. WindowsIdentity identity = new WindowsIdentity.GetCurrent(); string[] RoleArray = {“Supervisor”, “EX”}; GenericPrincipal principal = new GenericPrincipal(identity, RoleArray); B. GenericIdentity identity = new GenericIdentity(userName.Text); string[] RoleArray = {“Supervisor”, “EX”}; WindowsPrincipal principal = new WindowsPrincipal(identity); C. GenericIdentity identity = new GenericIdentity(userName.Text); string[] RoleArray = {“Supervisor”, “EX”}; GenericPrincipal principal = new GenericPrincipal(identity, RoleArray); D. WindowsIdentity identity = new WindowsIdentity.GetAnonymous(); string[] RoleArray = {“Supervisor”, “EX”}; WindowsPrincipal principal = new GenericPrincipal(identity, RoleArray);
|
|
View Answer |
|
You develop a Windows-based application by using Visual Studio .NET. The application includes a form named XYZForm and a class named Contact. XYZForm includes a button named cmdCreateContact. You must ensure that your application creates an instance of Contact when a user clicks this button. You want to write the most efficient code possible. Which code segment should you use? A. Contact contact = new Object(); B. Contact contact = new Contact; C. Object contact = new Contact; D. Contact contact = new Object;
|
|
View Answer |
|
You develop a Visual Studio .NET application that contains a function named XYZUpdate. For debugging purposes, you need to add an entry to a log file whenever XYZUpdate is executed. The log file is named DebugLog.txt. For maximum readability, you must ensure that each entry in DebugLog.txt appears on a separate line. Which code segment should you use? A. StreamWriter oWriter =. new StreamWriter(File.Open( @”C:DebugLog.txt”, FileMode.Append)); TextWriterTraceListener oListener = new TextWriterTraceListener(oWriter); Debug.Listeners.Add(oListener); Debug.WriteLine(“XYZUpdate “ + DateTime.Now.ToString); B. StreamWriter oWriter = new StreamWriter(File.Open( “C:\DebugLog.txt”, FileMode.Append)); TextWriterTraceListener oListener = new TextWriterTraceListener(oWriter); Debug.Listeners.Add(oListener); Debug.Write(“XYZUpdate “ + DateTime.Now.ToString); C. TextWriterTraceListener oListener = new TextWriterTraceListener(); oListener.Name = “C:\DebugLog.txt”; Debug.Listeners.Add(oListener); Debug.WriteLine(“XYZUpdate “ + DateTime.Now.ToString); D. TextWriterTraceListener oListener = new TextWriterTraceListener(); oListener.Name = “C:\DebugLog.txt”; Debug.Listeners.Add(oListener); Debug.Write(“XYZ“ + DateTime.Now.ToString);
|
|
View Answer |
|
You develop a Windows-based application by using Visual Studio .NET. The application includes numerous method calls at startup. After optimizing your application code, you test the application on a variety of client computers. However, the startup time is too slow. You must ensure that your application starts as quickly as possible the first time it runs. What should you do? A. Precompile your application by using the Native Image Generator (Ngen.exe): Install the precompiled application on the client computers. B. Install your application on the client computers. Precompile your application by using the Native Image Generator (Ngen.exe). C. Precompile your application by using the JIT compiler. Install the precompiled application on the client computers. D. Install your application on the client computers. Precompile your application by using the JIT compiler.
|
|
View Answer |
|
You develop an enterprise application, called XYZApplication that includes a Windows Form presentation layer, middle-tier components for business logic and data access, and a Microsoft SQL Server database. You are in the process of creating a middle-tier component that will execute the data access routines in your application. When data is passed to this component, the component will call several SQL Server stored procedures to perform database updates. All of these procedure calls run under the control of a single transaction. The code for the middle-tier component will implement the following objects: SqlConnection cn = new SqlConnection(); SqlTransaction tr; If two users try to update the same data concurrently, inconsistencies such as phantom reads will occur. You must now add code to your component to specify the highest possible level of protection against such inconsistencies. Which code segment should you use? A. tr = cn.BeginTransaction(“ReadCommitted”); B. tr = cn.BeginTransaction(IsolationLevel.ReadCommitted); C. tr = cn.BeginTransaction(IsolationLevel.Serializable); D. tr = cn.BeginTransaction(“Serializable”);
|
|
View Answer |
|
You use Visual Studio .NET to create an assembly, called XYZAssembly, that will be used by other applications, including a standard COM client application. You must deploy your assembly on the COM application to a client computer. You must ensure that the COM application can instantiate components within the assembly as COM components. What should you do? A. Create a strong name of the assembly by using the Strong Name tool (Sn.exe). B. Generate a registry file for the assembly by using the Assembly Registration tool (Regasm.exe) Register the file on the client computer. C. Generate a type library for the assembly by using the Type Library Importer (Tlbimp.exe). Register the file on the client computer. D. Deploy the assembly to the global assembly cache on the client computer. Add a reference to the assembly in the COM client application.
|
|
View Answer |
|
You develop an application XYZApp that will be sold commercially. You create a Visual Studio .NET setup project to distribute the application. You must ensure that each user accepts your license agreement before installation occurs. What should you do? A. Add a launch condition to your setup project. Add your license agreement to the Message property of the launch condition. B. Open the user interface designer for your setup project. Select the Welcome dialog box from the Start object and add your license agreement to the CopyrightWarning property. C. Save you license agreement in the Rich Text Format and add the file to your setup project.. Open the property pages for the setup project and set the Certificate to the name of your Rich Text file. D. Save your license agreement in Rich Text Format and add the file to your setup project. Open the user interface designer for the setup object. From the Start object, select the License Agreement dialog box and set the LicenseFile property to the name of your Rich Text file.
|
|
View Answer |
|
You develop an inventory management application called XYZManagement that will call a Microsoft SQL Server stored procedure named sp_GetDailyXYZSales. The stored procedure will run a query that returns your daily sales total as an output parameter. This total will be displayed to users in a message box. Your application uses a SqlCommand object to run sp_GetDailyXYZSales. You write the following code to call sp_GetDailyXYZSales: SqlConnection cnn = new SqlConnection(myConnString); SqlCommand cmd = new SqlCommand(“sp_GetDaily XYZ Sales”, cnn); cmd.CommandType = CommandType.StoredProcedure; SqlParameter prm = cmd.Parameters.Add(“@ItemTotal”, SqlDbType.Int); prm.Direction = ParameterDirection.Output; cnn.Open(); cmd.ExecuteNonQuery(); Now you must write additional code to access the output parameter. Which code segment should you use? A. MessageBox.Show(“Total is: “ + cmd.Parameters[“@Output”].Value.ToString()); B. MessageBox.Show(Total is: “ + cmd.Parameters[“@Output”].ToString()); C. MessageBox.Show(“Total is: “ + cmd.Parameters[“@ItemTotal”].Value.ToString()); D. MessageBox.Show(“Total is: “ + cmd.Parameters[“@ItemTotal”].ToString());
|
|
View Answer |