Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

1. Choices: backcolor, location, name, font, size Identity which property could

ID: 3760556 • Letter: 1

Question

1. Choices: backcolor, location, name, font, size

Identity which property could be set so that a Form object would perform the following function:

2.

Which namespace includes most of the Control classes for developing Windows applications?

Select one:

a. System.Windows.Components.Forms

b. System.Windows.Forms

c. System. windows. Drawing

d. System

e. System.Windows.Controls

3.

You' would use an IDE such as Visual Studio to construct Windows applications because it has the following capability:

Select one:

a. drag-and-drop construction

b. IntelliSense features

c. access to the Properties window listing properties and events

d. access to the Toolbox for dropping controls

e. all of the above

4. Click is an example of a:

Select one:

a. method

b. property

c. event

d. control

e. handler

5.

If the System. windows. Forms namespace is imported, the following statement:
this.textboxl = new System.Windows.Forms.TextBox();
can be written as:

Select one:

a. this.textbox1 = new TextBox();

b. textbox1 = new TextBox();

c. textbox1 = new System.Windows.Forms.TextBox();

d. all of the above

e. none of the above

6.

The statement that actually constructs or instantiates a Button object is:

Select one:

a. private System.Windows.Forms.Button buttonl;

b. buttonl.Click += new System.EventHandler(this.buttonl_Click);

c. this.Controls.AddRange(this.buttonl);

d. buttonl.Name = "A button";

e. this.buttonl = new System.Windows.Forms.Button();

7.

The statement that registers a Button object click event with the operating system is:

Select one:

a. this.buttonlClickEvent = new System.Windows.Forms.Button();

b. private System.Windows.Forms.Button buttonlClickEvent;

c. buttonl.Click += new System.EventHandler(this.buttonl_Click);

d. buttonl.Click = "Register Me";

e. this.Controls.AddRange(this.buttonlClickEvent);

8.

The property of the TextBox control that is used to set all characters to uppercase as they are typed is:

Select one:

a. UpperCase

b. CharacterCasing

c. ConvertToUpper

d. Text

e. ToUpper

9.

Which of the following might be the heading for an event-handler method?

Select one:

a. private void btnl_Click(object sender, System.EventArgs e)

b. MediaTypeNames.Application.Run(new TempAgencyForm());

c. btnCalculate.Click += new System.EventHandler(this.btnCalculate_Click);

d. this.btnCalculate = new System.Windows.Forms.Button();

e. none of the above

10.

Which of the following design considerations leads to more user-friendly presentation layers for GUls?

Select one:

a. Avoid clutter.

b. Be consistent with font, color, and placement.

c. Design for the target audience.

d. Use contrast to call attention to something.

e. all of the above

11.

The #region... #endregion is an example of a C# _______

Select one:

a. required statement for creating Windows applications

b. preprocessor directive

c. Windows class declaration statement

d. reference to a namespace called region

e. collapsible segment of code that must be used for Windows applications

12.

During design, how can you separate the business logic from the presentation layer?

Select one:

a. Create two forms, one for input and the other for output.

b. Create two objects using an object-oriented approach.

c. Create at least two methods.

d. Create separate classes for each.

e. all of the above

13.

Which of the following inherits members from the Control class?

Select one:

a. Label

b. Form

c. TextBox

d. Both A & C

e. all of the above

14.

One of the differences between a console application and a Windows application is:

Select one:

a. Variables must be declared with console applications.

b. One font size is used with console applications.

c. Windows applications require that program statements be placed in a class.

d. Execution always begins in the Main() method for console applications.

e. Classes can only be used with console applications.

15.

The ____ is the front end of a program that represents the presentation layer or the visual image of the program.

Select one:

a. framework

b. control

c. interface

d. IDE

e. Visual Studio

16.

Select one:

a. handler

b. statement

c. CUI

d. event

e. method call

17.

Which of the Control objects is viewed as a container that can hold other objects when you design a Windows application?

Select one:

a. Button

b. Frame

c. Form

d. Control

e. window

18.

Which property is used to set the caption for the Windows title bar?

Select one:

a. WindowTitle

b. TitleBar

c. Text

d. Title

e. Caption

19.

The class heading public class AForm : Form
indicates that:

Select one:

a. Form is a derived class of the AForm class.

b. AForm is the base class for the Form class.

c. The class being defined is identified as Form.

d. AForm inherits the members of the Form class.

e. none of the above

20.

Select one:

a. constructor

b. mutator method

c. accessor method

d. data member

e. property

21. Choices: text, menu, forecolor, sorted, selecteditem

For the following table, identify which properties can be used to set the given values for the controls

22.

Delegates store:

Select one:

a. events

b. data and methods about the events in a program events

c. address of methods

d. the address for signatures of data

23.

The signature for a method includes only the:

Select one:

a. method name and return type

b. number of parameters and the data type of the parameters

c. method name, number of parameters, and the data type of the parameters

d. return type, method name, number of parameters, and the data type of the parameters

e. return type, number of parameters, and the data type of the parameters

24.

One distinguishing characteristic between a ListBox control object and a comboBox control object is that:

Select one:

a. A scroll bar can be seen with ComboBox objects.

b. ComboBox objects are used for output only.

c. Multiple selections are possible with ListBox objects.

d. It is easier to program the ComboBox object event-handler method(s).

25.

A default event-handler method for a ListBox object is:

Select one:

a. KeyPress()

b. SelectedItem()

c. SelectedIndexChanged()

d. Selected()

e. Click()

26.

ComboBox objects offer the added functionality over a ListBox object of

Select one:

a. containing a text box for values to be entered at run time

b. including a scroll bar for moving down the items

c. allowing values to be removed at run time

d. allowing multiple selections to be made

27.

Assuming comboBoxData is instantiated as a ComboBox, which of the following statements would retrieve its selection and place it in a string variable?

Select one:

a. string s = ComboBox.Selection;

b. string s = comboBoxData.Text;

c. string s = ComboBox.comboBoxData.Text;

d. string s.Text = comboBoxData.Text;

28.

The GroupBox provides more functionality for which type of objects?

Select one:

a. CheckBox

b. TextBox

c. RadioButton

d. ListBox

e. ComboBox

29.

Click() events are the default event for which type of object?

Select one:

a. MenuItem

b. RadioButton

c. CheckBox

d. Button

30.

Which property can be set for a form to enable the Enter key to function like a mouse click for a selected Button object?

Select one:

a. Enter

b. AcceptKey

c. EnterKey

d. AcceptButton

e. Button Click

Associate a name of designForm with the Form object. Change the background color for the form. Change the size of the window to 400 by 400. Position the window near the center of the screen. Set the default font to Courier for all controls that are added.

Explanation / Answer

1)font 2)b 3)e 4)c 5)b 6)d 7)e 8)e 9)e 10)e 11)e 12)d 13)d 14)d 15)a 16)a 17)e 18)d 19)d 20)a 21)selected item

22)b 23)d 24)c 25)c 26)d 27)b 28)d 29)d 30) e