L11 QUIZ: Ch 7, 9, and 10

Pataasin ang iyong marka sa homework at exams ngayon gamit ang Quizwiz!

The ____________ property for the form can be set to a specific button to allow the Enter key to be associated with that button, so that pressing the Enter key is the same as clicking the button.

AcceptButton

The static method that stops the application and closes all of its windows is ____.

Application.Exit( )

All arrays, of any type, inherit characteristics from the ____________ class, which includes a number of predefined methods and properties.

Array

Using the tools available from the FORMAT menu can greatly reduce your development time. All of the following are menu options EXCEPT ____.

Attach to Process

If you accidentally double-click on the form, you register the ____________ event.

Form1_Load( )

Most classes, including control classes such as Label, Button, and TextBox, used with Windows application are defined in the ____________ namespace.

System.Windows.Forms

Most of the classes used to develop Windows-based applications are organized in which namespace?

System.Windows.Forms

You change the appearance of the tabs for a TabControl object using the ____ Collection Editor.

TabPage

The Form property used to set the title bar on the Windows form is ____.

Text

To retrieve data from a ListBox control as string data, use the ____ property.

Text

To retrieve multiple selections from a ListBox control, you can use all of the following properties EXCEPT ____.

Text

Which property is used to set or get the caption of the title bar for Windows applications?

Text

Probably the most commonly used control for input and output is the ____.

TextBox

Probably the most commonly used control is the ____________. It can be used to enter data or display text during run time.

TextBox

How does a Windows application differ from a console-based application?

Windows applications sit in a process loop, once executed, waiting for an event to execute.

Double-clicking on the form when you are using the Form Designer brings up the Code Editor and also ____.

adds a form load method heading

Windows forms and controls offer a wide variety of changeable properties including ____.

all of the above

With a ListBox of numbers, the SelectedItem property returns ____.

an object representing the one selected.

After a button click event is registered, the associated method is called ____.

automatically when the button is clicked

The class heading that is generated by Visual Studio for Windows applications includes a colon (:) following the class name. The identifier following the colon is the ____.

base class

All data values placed in an array must be of the same ____________.

base type

Which of the following is an issue that you should consider and incorporate into your interfaces?

be consistent with placement of items

It is a good idea to consistently use an appropriate prefix for the user interface elements. You might prefix buttons with ____________.

btn

When you do a compile-time initialization of array elements, values are separated by ____________.

commas

The SelectionMode property of the ListBox object ____.

enables multiple selections to be made

A(n) ____ is a notification from the operating system that an action, such as the user clicking the mouse or pressing a key, has occurred.

event

When a button is clicked by a user, its ____________ is automatically called up.

event-handler method

A console-based application interface can include menus, buttons, pictures, and text in many different colors and sizes. true or false

false

Array identifiers are normally defined using a plural noun. true or false

false

Associating a method in your program to an event is called delegating the event. true or false

false

ComboBox objects save space on a form through their use of a predefined size property. true or false

false

For an array that is dimensioned with a Length of 100, valid subscripts are 0 through 100. true or false

false

If you use the params parameter type, params must appear both in the formal parameter list of the method heading and in the actual argument list. true or false

false

Included as part of .Visual Studio are a number of preconfigured dialog boxes Find and Replace, Spell Checker and File Save. true or false

false

Multiple selections cannot be made from a ListBox control object. true or false

false

Probably the most commonly used control for both input and output is the button because it adds additional functionality to an application. true or false

false

Properties are added to a class to enable client applications to access public members. true or false

false

Since each delegate wraps a single method, there must be a one-to-one correspondence between the method and its delegate. true or false

false

The order of when labels, buttons and controls are placed on the form does not impact anything. true or false

false

The this keyword is used to indicate the current instance of the delegate. true or false

false

To add an icon for the application, add a PictureBox object and set the Image property to the desired .jpg image. true or false

false

To add functionality to the ListBox control object, you register the DoubleClick( ) event handler method. true or false

false

With console-based applications, you register events about which you want your program to receive notification. true or false

false

You can instantiate arrays of user-defined array objects and send in arrays as arguments to methods, but you cannot return arrays from methods. true or false

false

int [ ] anArray = new int[24]; For the above declaration, 25 cells are set aside for the array since the first element is referenced by index 0. true or false

false

public class aForm : Form With the heading above, Form is the derived class. true or false

false

The ____________ loop structure can be used to iterate through an array. However, it can be used for read-only access to the elements.

foreach

A large field of research in the field of computing is focused on ____________. The research concentrates on the design and implementation of interactive computing systems for human use.

human-computer interaction or HCI

A derived class ____ methods of another class.

inherits

Use the ____________ keyword to instantiate an object of an array.

new

To reduce the chances that typing errors will corrupt your solutions, a good design principle to follow is ____.

not allow users enter values that can be calculated

With Windows applications, both the files, Form1.cs and Form1.Designer.cs, only include part of the definition for the class in their file. Thus, both include the keyword ____________ in their class heading definition.

partial

In a Windows application, Application.Run(winForm); ____.

places the application in a process loop so that it recieves messages from the operating system

Instead of calling on the operating system with a request, as console applications do, Windows applications receive messages from the operating system that an event has occurred. true or false

true

Menus offer the advantage of requiring less real estate on the screen. true or false

true

One of the guidelines for good design is to keep an item the same as other items, unless you are trying to call attention to that item. true or false

true

The Clear( ) method of the Array class sets all integer elements to zero. true or false

true

The Items property can be used to set the initial values for a ListBox object. The Items editor is opened when you click the ellipsis to the right of the Collection property in the Properties window. true or false

true

The default setting for the ComboBox object's DropDownStyle property, is DropDown. Retaining this setting prohibits new text from being entered into the ComboBox. true or false

true

The delegate signature indicates what the method signatures must look like if they are to be referenced by the delegate. true or false

true

To declare an array, the value(s) used inside the square bracket can be a constant literal, a variable, or an expression that produces an integral value. true or false

true

Use .NET predefined methods and properties whenever possible as opposed to writing new code. true or false

true

Use the Format>Align menu options to line up associated controls so controls are consistently placed in the same row or column. true or false

true

When a method uses the params modifier, it indicates that the number of arguments to the method may vary. true or false

true

While in Design view, you can select controls from the Toolbox window and drag and drop them onto your form container. true or false

true

You can declare an array without dimensioning its size, but the size must be determined before you can access it. true or false

true

double [ ] price = new double [ ] {3, 2.2, 4.7, 6.1, 4}; Looking above, the value of price.Length is 5. true or false

true

In Visual Studio, the ____ window is used to view and change the design time properties and events of an object.

Properties

The ____ method of the Control class sets the input focus.

Focus( )

To cause the cursor to be positioned in a specific TextBox, invoke the ____________ method on that control.

Focus( )

The ____ property is used to determine whether a control is the one currently selected.

Focused

The top-level class used as a container to hold other controls for an application is called a ____.

Form

You can add a shortcut to a menu by preceding one of the characters in the menu name with a(n) ____. This places an underline under the next character typed.

ampersand (&)

The ____________ property can be set for RadioButton controls to indicate which button is initially selected.

checked

What are objects, such as buttons, menus, and labels, that can display and respond to user interaction, called?

controls

An instance of the delegate class is called a(n) ____.

delegate

To set the background color for the ListBox control, use the Back property. true or false

false

When a program is placed in a process loop, the program cannot be minimized, resized, or closed like other Windows applications. true or false

false

When you design Windows applications using Visual Studio, you must be sure to add program statements to call the Dispose( ) method to clean up or release unused resources back to the operating system. true or false

false

With Windows applications, you write methods called processors to indicate what should be done when a mouse is clicked on a button or the press of a key occurs. true or false

false

Inheriting characteristics from base classes adds ____________ to your program without the burden of your having to do additional coding

functionality

A test plan to verify the accuracy of the application should be designed before coding the application. true or false

true

Array.Copy(waterDepth, 2, w, 0, 5); The Copy( ) method, shown above, is a(n) ____________ method.

"static or class"

The first element of an array is always referenced by index ____________.

0

A ____ control offers the advantage of multiple selections and the opportunity to add or remove items dynamically at runtime.

ListBox

____________ controls can be used to display a list of items from which the user can make single or multiple selections. A scroll bar is automatically added to the control if the total number of items exceeds the number that can be displayed.

ListBox

To create mutually exclusive options use ____.

a GroupBox object with RadioButton objects

With Windows Presentation Foundation (WPF) applications, ____.

a new XAML file, resembling an HTML file, is added to the solution

Elements in an array are sometimes referred to as ____________ variables.

indexed

The method that converts all characters entered to and from their uppercase or lowercase equivalent is ____.

CharacterCasing

____ objects usually appear as small boxes that allow users to make a yes/no selection.

CheckBox

The default event-handler method for CheckBox objects is ____________.

CheckedChanged( )

What is the name of the default event handler method for RadioButton and CheckBox objects?

CheckedChanged( )

Which of the following is one of the pre-configured dialog boxes that can be added to an application?

ColorDialog

____________ objects have an added feature over a ListBox objects that they contain their own text box field as part of the object, but they allow only a single selection to be made.

ComboBox

ComboBox objects have an added feature over the ListBox controls in that ____.

ComboBox objects contain their own text box field

Objects like colorDialog, fontDialog, ToolTip and MenuStrip are added to the ____________ for the application when they are dragged and dropped onto the form.

ComponentTray

Which control is used for placing objects, like RadioButtons, together? This control not only offers the benefit of visual appearance, but also helps during design because you can set properties that impact all the associated objects.

GroupBox

The field of research that concentrates on the design and implementation of interactive computing systems is called ____.

Human Computer Interaction (HCI)

Which property is used with the PictureBox control to associate an actual picture to the control?

Image

In order to add values to the ListBox at run time, invoke the Add( ) method on the ____________ property.

Items

The ____________ event fires when a key is pressed while the control has focus.

KeyPress( )

For both Windows applications, execution begins with the first statement in the ____________ method.

Main( )

The ____ class in the System.Windows.Forms namespace enables you to add more functionality to your application by offering additional user options, such as adding layers of menus.

MenuStrip

Which TextBox property can be set to enable several lines of data to be entered by the user?

MultiLine

Which property can be set to indicate whether text in the TextBox is read-only or not?

ReadOnly

Double-clicking on the ListBox control registers which default event?

SelectedIndexChanged

SelectedItems and ____ properties can be used to retrieve items from a ListBox object.

SelectedItem

The ____________ method associated with the predefined dialog classes, like FontDialog or ColorDialog causes the dialog box to be displayed.

ShowDialog( )

Using the ____________ feature in Visual Studio, controls can be more easily aligned when they are initially added to the form.

SnapLine

An entire array collection of data can be ordered alphabetically with a call to the Array class member method ____________.

Sort( )

One way to convert item objects retrieved from ListBoxes to strings for displaying is to use the Text property for retrieval. Another option is to retrieve the values as objects using the SelectedItem property and invoke the ____________ method.

ToString( )

A(n) ____________ is an underlined character in the text of an menu item or on the label of a control such as a button that enables user to click the button, without using the mouse, by pressing the Alt key in combination with the predefined character.

access key

To create an array to hold the 5 numeric scores, you could write ____________.

int [ ] score = new int[5];

The length or size of the array is specified using a(n) ____________ value in the form of a constant literal, a variable, or an expression that produces an integer value.

integral

The front end portion of the program that the user sees and responds to is called the ____.

interface

One of the special properties in the Array class is ____________. It returns an int representing the total number of elements in an array.

length

In order for event handlers to be called using delegates, the delegate must ____.

maintain a list of the registered event handlers for the event

The preprocess directive #region can be added in the program to ____.

mark sections of code that can be expanded or collapsed

Delegate declarations resembles ____ declarations.

method

Event handlers are ____.

methods

When the delegate wraps more than one method, it is called a(n) ____ delegate.

multicast

One of the advantages of a ListBox object over other types of objects used for input is ____.

multiple selections can be made

It is important to name the button object, because once named ____.

program statements can be written to reference it.

Arrays are ____________ variables. The array identifier memory location does not actually contain the values, but instead stores an address indicating the location of the first element in the array.

reference

Delegates are special types of .NET classes whose instances store ____.

references to methods

Delegate signatures differ from method signatures in that the delegate also includes its ____.

return type

An added value of ComboBox objects is that compared to a ListBox object they ____.

save space on a form

To have the ListBox or ComboBox Items arranged in alphabetical order ____.

set the Sorted property to true

What does the following statement do? this.BackColor = System.Drawing.Color.Blue;

sets the form color to blue

All event-handler take two parameters. The first parameter, object sender, represents the source that raises the event, and the second parameter is the data for the event; thus, they normally have the same ____________.

signature

Array identifiers are normally defined using a(n) ____________.

singular noun

To access an array element, you must specify which element is to be retrieved by placing an index inside ____________ following the array identifier

square brackets or [ ]

A good design principle to follow when developing Windows applications is ____.

to keep data entry to a minimum

You can assign a(n) ____________ to controls, such as text boxes or menu items, so that text is displayed when the cursor is rested on top of the component.

tool tip

Additional controls can be bought from other vendors and added to the Toolbox. true or false

true

An example of an event that might be registered is the "Press the enter key." true or false

true

Arrays are reference variables. true or false

true

Arrays can be sent to methods as arguments, and methods can have arrays as their return type. true or false

true

Arrays can be used as fields or instance variables in classes; and, arrays of objects can be declared. true or false

true

Avoid using bright colors (such as reds), especially for backgrounds because they can result in user eye fatigue. true or false

true

If you use Visual Studio, most of the standard service plumbing code is added automatically for you. true or false

true

In order to change the background color for the application, you could set the BackColor property of the form. true or false

true

The process that includes identifying an event, such as a button click as being of interest, and associating a method to be executed when the event occurs describes ____.

writing an event


Kaugnay na mga set ng pag-aaral

Lección 14 - Practice - Estructura - 14.2 Nosotros/as commands - Transformar

View Set

WEEK 10 DIABETES Chapter 51 + Karch Ch 38

View Set

Density & Physical/Chemical Changes

View Set

ASVAB Mechanical Comprehension practice

View Set

pharmacology module 1 study questions

View Set