Programming 1 Visual Basic Chapter 2 Quiz Review

Programming 1 Visual Basic Chapter 2 Quiz Review True/False Indicate whether the statement is true or false. ____ 1. The Visual Basic IDE menu bar co...
1 downloads 1 Views 136KB Size
Programming 1 Visual Basic Chapter 2 Quiz Review True/False Indicate whether the statement is true or false. ____

1. The Visual Basic IDE menu bar contains buttons that represent different actions.

____

2. A Visual Basic project consists of one file.

____

3. A Windows application interface includes at least one form.

____

4. A selected object displays handles.

____

5. There is no difference between the (Name) and Text properties of a Label object.

____

6. Controls can be moved on the interface during run time.

____

7. The MenuStrip control is used to add a menu to an application.

____

8. Visual Basic automatically assigns a descriptive name to MenuItem objects.

____

9. An OOP application uses objects to perform tasks.

____ 10. An application contains a set of instructions called objects. ____ 11. The F7 key is used to display the Code window. ____ 12. When adding an event procedure, the event name is selected from the Class Name list. ____ 13. A method is a named set of statements that perform a single well-defined task. ____ 14. The statement Me.lblMessage.Text="Hello!" sets the (Name) property of the lblMessage Label object to Hello!. ____ 15. A GroupBox object is used to group radio buttons. ____ 16. Button object names should begin with btn. ____ 17. Not following code conventions will generate an error when an application is run. ____ 18. Pressing the F1 key displays the Help window. ____ 19. An event-driven application executes code in response to an event. ____ 20. An application with menus includes a MenuStrip control object. ____ 21. Button object names should begin with btn.

____ 22. When adding an event procedure, the event name is selected from the Class Name list. ____ 23. Button object names should begin with btn. ____ 24. Closing a project removes it from the IDE. ____ 25. The IDE Navigator uses the keyboard to switch between open files. Multiple Choice Identify the choice that best completes the statement or answers the question. ____

1. Which window displays the application interface and allows objects to be added, deleted, and sized? a. the Start window c. the Code window b. the Design window d. the application window

____

2. Which area of the IDE contains controls that are used to create objects on the interface? a. the Toolbox c. the Solution Explorer window b. the Start Page d. the Properties window

____

3. Which area of the IDE is used to switch between the Design and Code windows? a. the Toolbox c. the Solution Explorer window b. the Start page d. the Properties window

____

4. To size an object a. select it and then use the arrow keys. b. drag in the center of the object. c. right-click the object and then select Resize. d. select it and then drag a handle.

____

5. Which is not a property of the Label control? a. (Name) b. Text

c. Font d. Style

____

6. Which is a difference in a form between the Design window and run time? a. The controls on the form cannot be edited. b. The form changes color. c. The form gets much larger. d. The form displays each object’s Name property.

____

7. Which control is used to add a menu to an interface? a. the Label control c. the MenuStrip control b. the RadioButton control d. the AddMenu control

____

8. A set of instructions that tells the computer how to perform a task are called a. a form. c. objects. b. an interface. d. statements.

____

9. Which type of statement is used in a procedure to change a value at run time? a. a value statement c. an object statement b. a property statement d. an assignment statement

____ 10. Which object is used to group related radio buttons?

a. a Label object b. a GroupBox object

c. a MenuStrip object d. a Button object

____ 11. Which is a difference in a form between the Design window and run time? a. The controls on the form cannot be edited. b. The form changes color. c. The form gets much larger. d. The form displays each object’s Name property. ____ 12. A set of instructions that tells the computer how to perform a task are called a. a form. c. objects. b. an interface. d. statements. ____ 13. Which statement indicates the end of an event procedure? a. End c. End Procedure End Sub b. d. Sub ____ 14. Which object is used to group related radio buttons? a. a Label object c. a MenuStrip object b. a GroupBox object d. a Button object

____ 15. In the event procedure above, which type of object is clicked in order to execute the Click event procedure? a. a Label object c. a Form object b. a Button object d. a MenuStrip object ____ 16. In the event procedure above, what result is assigned to the label’s Text property? a. 5 + 10 – 3 c. 12 b. 5 d. btnQuestion1 ____ 17. Which character begins a comment? a. a colon (:) b. a double quotation mark (")

c. a single quotation mark (') d. a question mark (?)

____ 18. Which statement is used to stop program execution? a. Application.Over() c. Application.Exit() b. Application.Halt() d. Application.Quit() ____ 19. To size an object a. select it and then use the arrow keys. b. drag in the center of the object. c. right-click the object and then select Resize. d. select it and then drag a handle. ____ 20. Which area of the IDE contains controls that are used to create objects on the interface? a. the Toolbox c. the Solution Explorer window b. the Start Page d. the Properties window ____ 21. A set of instructions that tells the computer how to perform a task are called a. a form. c. objects.

b. an interface.

d. statements.

____ 22. Which area of the IDE is used to switch between the Design and Code windows? a. the Toolbox c. the Solution Explorer window b. the Start page d. the Properties window ____ 23. Which key combination is used to open the IDE Navigator? a. Shift+Tab c. Ctrl+Tab b. Shift+F1 d. Ctrl+F1 ____ 24. Which control is used to add a menu to an interface? a. the Label control c. the MenuStrip control b. the RadioButton control d. the AddMenu control ____ 25. Together, the statements for an application are called a. a form. c. program code. b. comments. d. instructions. Matching

a. b. c. d. e. f. g. h.

FORM COMMENT ASSIGNMENT STATEMENT MENU BAR PROPERTIES WINDOW PROJECT OPERATOR PRECEDENCE SOLUTION EXPLORER WINDOW

i. j. k. l. m. n. o.

NUMERIC EXPRESSION EQUAL SIGN CODE WINDOW TOOLBOX VISUAL BASIC PROPERTY DESIGN WINDOW

____

1. Formed with arithmetic operators.

____

2. Text that explains and clarifies program code for other programmers. Comments are preceded by a single quotation mark.

____

3. The part of the IDE that contains the names of menus that contain commands.

____

4. A control class object that is an application interface. Contains a title bar, system menu, and Minimize, Maximize, and Close buttons.

____

5. The set of files that make up a Visual Basic application.

____

6. Displays the application interface and allows control class objects to be added, deleted, and sized.

____

7. Object-oriented programming language used to create Windows applications.

____

8. The part of the IDE that displays the Form1 class where event procedures and other code are entered.

____

9. The part of the IDE that lists the properties values of an object.

____ 10. The order in which operators are evaluated in a numeric expression.

____ 11. Uses the equal sign to give the object property on the left of the equal sign the value on the right of the equal sign. ____ 12. An operator that indicates the property on the left is to receive the value on the right. ____ 13. Used to switch between the Design and Code windows. ____ 14. The part of a control object that defines its appearance, behavior, position, and other attributes. ____ 15. The part of the IDE that contains controls that are used to add objects to a form.

Programming 1 Visual Basic Chapter 2 Quiz Review Answer Section TRUE/FALSE 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18. 19. 20. 21. 22. 23. 24. 25.

ANS: ANS: ANS: ANS: ANS: NOT: ANS: ANS: ANS: ANS: ANS: ANS: ANS: ANS: ANS: ANS: ANS: ANS: ANS: ANS: ANS: ANS: ANS: ANS: ANS: ANS:

F PTS: F PTS: T PTS: T PTS: F PTS: Critical Thinking F PTS: T PTS: T PTS: T PTS: F PTS: T PTS: F PTS: T PTS: F PTS: T PTS: T PTS: F PTS: T PTS: T PTS: T PTS: T PTS: F PTS: T PTS: T PTS: T PTS:

1 1 1 1 1

TOP: TOP: TOP: TOP: TOP:

Integrated Development Environment Creating a New Project The Windows Form The Windows Form The Label Control

1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

TOP: TOP: TOP: TOP: TOP: TOP: TOP: TOP: TOP: TOP: TOP: TOP: TOP: TOP: TOP: TOP: TOP: TOP: TOP: TOP:

Saving and Running an Application The MenuStrip Control The MenuStrip Control Program Code Program Code Program Code The Event Procedure The Event Procedure Assignment Statements The RadioButton Control The Button Control Code Conventions Finding Help Visual Basic Applications The MenuStrip Control The Button Control The Event Procedure The Button Control Closing and Opening a Project and Quitting Visual Basic IDE Navigator

1 1 1 1 1 1 1 1 1 1 1

TOP: TOP: TOP: TOP: TOP: TOP: TOP: TOP: TOP: TOP: TOP:

Creating a New Project Creating a New Project Creating a New Project The Windows Form The Label Control Saving and Running an Application The MenuStrip Control Program Code Assignment Statements The RadioButton Control Saving and Running an Application

MULTIPLE CHOICE 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11.

ANS: ANS: ANS: ANS: ANS: ANS: ANS: ANS: ANS: ANS: ANS:

B A C D D A C D D B A

PTS: PTS: PTS: PTS: PTS: PTS: PTS: PTS: PTS: PTS: PTS:

12. 13. 14. 15. 16. 17. 18. 19. 20. 21. 22. 23. 24. 25.

ANS: ANS: ANS: ANS: ANS: ANS: ANS: ANS: ANS: ANS: ANS: ANS: ANS: ANS:

D B B B C C C D A D C C C C

PTS: PTS: PTS: PTS: PTS: PTS: PTS: PTS: PTS: PTS: PTS: PTS: PTS: PTS:

1 1 1 1 1 1 1 1 1 1 1 1 1 1

I B D A F O O K E G C J H N N

PTS: PTS: PTS: PTS: PTS: PTS: PTS: PTS: PTS: PTS: PTS: PTS: PTS: PTS: PTS:

1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

MATCHING 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15.

ANS: ANS: ANS: ANS: ANS: ANS: ANS: ANS: ANS: ANS: ANS: ANS: ANS: ANS: ANS:

TOP: TOP: TOP: TOP: TOP: TOP: TOP: TOP: TOP: TOP: TOP: TOP: TOP: TOP:

Program Code The Event Procedure The RadioButton Control The Button Control The Button Control Commenting Code The Event Procedure The Windows Form Creating a New Project Program Code Creating a New Project IDE Navigator The MenuStrip Control Program Code