Programming SEMESTER REVIEW

Programming SEMESTER REVIEW True/False Indicate whether the statement is true or false. __T__ 1. When you click on the Auto Hide button on a window, t...
Author: Magnus Black
9 downloads 0 Views 238KB Size
Programming SEMESTER REVIEW True/False Indicate whether the statement is true or false. __T__ 1. When you click on the Auto Hide button on a window, the window is minimized and appears as a tab on the edge of the window. __F__ 2. In the Properties window, the object’s properties can be displayed sorted alphabetically or numerically. __F__ 5. The Text property of a Windows Form object displays text in the body of the form. __F__ 6. Saving a solution adds an asterisk to the designer window’s tab. __T__ 7. Only one solution at a time may be open in one Visual Basic 2010 window. __T__ 8. If a solution is already open in the IDE, it is automatically closed before another solution is opened. __T__ 9. The toolbox contains the tools that you use when designing a Visual Basic application. __T__ 10. The Label tool is an appropriate control when you do not want the user to modify data. __T__ 11. The Project Designer window allows you to specify which form will display when the application starts. __T__ 12. Actions performed by the user such as clicking, double-clicking, and scrolling are known as events. __T__ 13. A timer control is used to process code at regular time intervals. __F__ 14. When the form object's MinimizeBox property is set to False, the Minimize button is removed from the form's title bar. __T__ 15. When the ControlBox property is set to False, the icons and buttons are removed but the title bar remains. __F__ 16. The title bar on a form cannot be removed from splash screen applications. __T__ 17. To print the program code, the Code Editor window must be the active, or current window. __F__ 18. It is a good idea when designing the user interface to use a lot of graphics to maintain the user's interest. __T__ 19. 0 __T__ 20. You can use the Format function to improve the appearance of the numbers displayed in an interface. __T__ 21. Most errors are typing/spelling errors that occur when entering code. __T__ 22. To test an application, you should use both valid and invalid test data. __T__ 23. Single and Double type variables can store numbers containing a decimal place. __F__ 24. Integer, Long, and Short type variables can store floating-point numbers. __F__ 25. Spaces are allowed in variable names. __T__ 26. All numeric variables are automatically initialized to zero if no initial value is specified when the variable is declared. __T__ 27. A literal constant is an item of data whose value does not change while the application is running.

__T__ 28. A variable’s lifetime indicates how long the variable remains in the computer’s internal memory. __F__ 29. A variable declared in the Declaration section of a form is called a procedure-level variable. __T__ 30. A variable declared within a procedure cannot be seen by any other procedure. __F__ 31. A variable that has procedure scope is available to all procedures in the application. __T__ 32. A named constant’s value cannot be changed while the application is running. __T__ 33. Named constants make programs more self-documenting and easier to modify. __T__ 34. A default button will be activated if the user presses the Enter key even if the button does not have the focus. __F__ 35. An If selection structure contains two sets of instructions to be executed, one for the true condition and one for the false condition. __T__ 36. The code that follows the Then statement consists of those instructions that will be executed when the condition is false. __F__ 37. The code that follows the Else statement are those instructions that will be executed when the condition is true. __T__ 38. Before using a string in a comparison, you can use either the ToUpper method or the ToLower method to convert the string to uppercase or lowercase, respectively, and then use the converted string in the comparison. __T__ 39. The If/ElseIf/Else selection structure needs only one End If statement to mark the end of the selection structure. __F__ 40. Every Case statement must be terminated with End Case. __T__ 41. In a Case selection structure, the expression Case Is 10 To 5 would be an incorrectly formed case statement. __T__ 42. Each radio button can have a unique access key, which allows the user to select the button using the keyboard. __T__ 43. The default radio button is designated by setting the Checked property to a value of True. __F__ 44. The minimum number of radio buttons in a group is one. __F__ 46. Two radio buttons from the same group can be selected at any one time. __F__ 47. When a user selects a second CheckBox in a group, previously selected CheckBox items are deselected. Multiple Choice Identify the choice that best completes the statement or answers the question. _D___ 48. A user ____ is what the user sees and interacts with while an application is running. a. service c. splash b. profile d. interface _D___ 49. Each object has a set of attributes, called ____, that determine an object's appearance and behavior. a. codes c. global settings

b. events

d. properties

_D___ 50. The position of the form on the screen when an application first starts is controlled by setting the ____ property. a. Position c. Location b. Size d. StartPosition _C___ 51. When you click the ellipsis (...) button in the Settings box of the Font property, ____. a. a list of font styles appear c. a dialog box opens b. a color palette appears d. the attribute is removed _A___ 52. To size a form using the keyboard, you can select the form and press and hold the ____ key and then press one of the arrow keys on the keyboard. a. Shift c. Alt b. Ctrl d. Ctrl & Shift _C___ 53. A label control's ____ property determines the value that appears inside the control. a. Caption c. Text b. Label d. Values _C___ 54. The location of a control on the screen can be modified by changing the X and Y properties measured in pixels. The Y value is measured from the ____. a. left border c. top border b. right border d. bottom border __A__ 55. The location of a control on the screen can be modified by changing the X and Y properties measured in pixels. The X value is measured from the ____. a. left border c. top border b. right border d. bottom border __D__ 56. The ____ function key will start a Visual Basic 2010 application in the IDE. a. F2 c. F4 b. F3 d. F5 __B__ 57. When you want the application to end when the user clicks the Exit button, you write the following code: ____. a. Me.Stop() c. Me.Terminate() Me.Close() b. d. Me.End() __C__ 58. You can change the background color of a text box by setting its ____ property. a. BackGround c. BackColor b. Color d. ForeColor __A__ 59. A ____ provides an area in the form for the user to enter data. a. text box c. button b. label d. check box __C__ 60. The character used to create an access key by inserting it into a text property is ____. a. ~ c. & b. ^ d. < __C__ 61. To employ an access key, press and hold down the ____ key as you tap the access key. a. Scroll c. Alt b. Backslash d. Tilde (~) __D__ 62. A control's order of receiving focus is set by changing the ____ property. a. GetFocus c. NextControl b. PrevControl d. TabIndex __A__ 63. The ____ method of a control will cause the focus on the screen to move to that control. a. Focus c. HighLight b. GoTo d. Select

__C__ 64. The syntax of the Focus method is ____, where “object” is the name of the object to which you want the focus sent. a. object.GetFocus() c. object.Focus() b. object.SetFocus() d. object.FocusThis() __D__ 65. Which of the following symbols is used to place documentation in a program and causes Visual Basic .NET to ignore the line? a. // c. */ b. /* d. ' __C__ 66. The ____ function temporarily converts a string to a number, and then returns the number. a. Num c. Val Number b. d. Value __B__ 67. Instead of storing data in the properties of various controls, programmers can create ____, which are memory locations inside the computer, to store data. a. characters c. integers b. variables d. strings __D__ 68. A variable name must begin with a letter or a(n) ____. a. ampersand (&) c. exclamation mark (!) b. percent sign (%) d. underscore (_) __C__ 69. Every numeric data type in Visual Basic has a ____ method that can be used to convert a string to that numeric data type. a. Convert c. TryParse b. Format d. Number __C__ 70. You declare a class-level variable using the ____ keyword. a. Dim c. Private b. Mod d. Static __B__ 71. You create a named constant using the ____ statement. a. Fixed c. ConstantFixed b. Const d. Perm __D__ 72. When a button is selected, the computer processes the code contained in the button’s ____ event procedure. a. Submit c. On b. Press d. Click __B__ 73. A control's ____ event occurs when a change is made to the contents of a control's Text property. a. CodeChanged c. ChangedText b. TextChanged d. TextModified __D__ 74. A variable that has ____ scope can be used anywhere within the procedure. a. block c. method b. statement d. procedure __C__ 75. You can use a(n) ____ to visually separate related controls from other controls on the form. a. radio button c. group box b. check box d. icon area __C__ 76. The ____ method displays a message box that contains text, one or more buttons, and an icon. a. MessageBox.Display c. MessageBox.Show b. MessageBox.Group d. MessageBox.Output __B__ 77. You use the ____ method to select all of the text contained in a text box. a. All c. AllText b. SelectAll d. GetAll __C__ 78. The Select Case statement ends with the ____ clause. a. End c. End Select b. End Case d. Select End

__B__ 79. When the Select Case statement includes a Case ____ clause, this clause must be the last clause in the statement. a. Otherwise c. Next b. Else d. Last __C__ 80. When the programmer wants to limit the user to one choice during input of mutually exclusive options, the ____ control should be used. a. TextBox c. RadioButton b. CheckBox d. Label __A__ 81. A form’s ____ event occurs when the application is started and the form is displayed the first time. a. Load c. Get b. Start d. Generate __D__ 82. A(n) ____ variable is a local variable that retains its value even when the procedure in which it is declared ends. a. dynamic c. independent b. Sub d. static