"using the File menu will automatically save all unsaved work on projects and forms"
ITEC1310 Test 1 Name:___________________ True/False (20 pts) Indicate whether the statement is true or false. ____ 1. A splash screen is the first image that appears when an application is started. ____ 2. The Solution Explorer window lists the names of the projects included in the current solution you are creating. ____ 3. A Windows Form object is the foundation for the user interface in a Windows-based application. ____ 4. The Properties window lists the names of the files included in the application you are creating. ____ 5. A namespace contains the code that defines a group of related properties. ____ 6. Closing the solution by using the File menu will automatically save all unsaved work on projects and forms. ____ 7. Only one solution at a time may be open in Visual Basic 2005. ____ 8. Actions performed by the user such as clicking, double-clicking, and scrolling are known as events. ____ 9. The function key that opens the Code Editor window in Visual Basic 2005 is F9. ____ 10. The title bar on a form cannot be removed from an application in Visual Basic 2005. ____ 11. Drawing a sketch of the user interface is performed in the planning phase. ____ 12. The first step in the planning phase of a programming solution is to sketch the user interface. ____ 13. Sentence capitalization means you capitalize only the first letter in the first word and in any words that are customarily capitalized. ____ 14. Pseudocode uses standardized symbols to show the logical steps in a solution to a programming project. ____ 15. Integer, Long, and Short type variables can store floating-point numbers. ____ 16. All numeric variables are automatically initialized to zero if no initial value is specified when the variable is declared. ____ 17. You can eliminate the problems that occur as a result of implicit type conversions by entering the Option Explicit On statement in the General Declarations section of the Code Editor window. ____ 18. An If selection structure contains two sets of instructions to be executed, one for the true condition and one for the false condition. ____ 19. The parallelogram is used in a flowchart for decision activities. ____ 20. The expression 2 * 3 + 1 > 1 * 2 + 3 Or 7 + 2 < 4 + 1 evaluates to False. 1 Multiple Choice (60 pts) Identify the choice that best completes the statement or answers the question. ____ 21. The Class View window ____. a. displays the names of projects and files included in a solution b. displays data connections and servers c. displays items that you can use when creating a project d. displays the classes, methods, and properties included in a solution ____ 22. The Server Explorer window ____. a. displays the names of projects and files included in a solution b. displays data connections and servers c. displays items that you can use when creating a project d. displays the classes, methods, and properties included in a solution ____ 23. The Solution Explorer window ____. a. displays the names of projects and files included in a solution b. displays data connections and servers c. displays items that you can use when creating a project d. displays the classes, methods, and properties included in a solution ____ 24. A Visual Basic 2005 application solution file will have a file extension of ____. a. .net c. .frm b. .app d. .sln ____ 25. A label control's ____ property determines the value that appears inside the control. a. Caption c. Text b. Label d. Values ____ 26. To align two or more selected controls along their left, right, top, or bottom borders you would use the ____ menu. a. Edit c. Align b. Format d. View ____ 27. The ____ function key will start a Visual Basic 2005 application in the IDE. a. F2 c. F4 b. F3 d. F5 ____ 28. When an application is started, Visual Basic 2005 will automatically create a file that will execute outside of the IDE and that has the project name and a(n) ____ file extension. a. .dll c. .sln b. .exe d. .suo ____ 29. The two list boxes at the top of the Code Editor window are used to select an object and to select the appropriate ____. a. method c. subroutine b. function d. event ____ 30. When you want the application to end when the user clicks the Exit button, you write the following code: ____. 2 a. Me.Stop() c. Me.Terminate() b. Me.Close() d. Me.End() ____ 31. Which of the following is the correct sequence of events when designing a solution? a. write code, design interface, plan the application b. design the interface. plan the application, write the code c. plan the application, write the code, design the interface d. plan the application, design the interface, write the code ____ 32. The programming process begins with a meeting between the programmer and the client; which of the following activities would be the last activity in the programming process? a. Build the user interface c. Test and debug b. Code the application d. Assemble the documentation ____ 33. The key used to create an access key by inserting it into a text property is ____. a. ~ c. & b. ^ d. < ____ 34. Which of the following is the correct syntax to move the focus to a control? a. Me.object.GetFocus() c. Me.object.Focus() b. Me.object.SetFocus() d. Me.object.FocusThis() ____ 35. 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. ' ____ 36. In the mathematical expression 4*3+15/3-6 which operation is performed last? a. + c. * b. - d. / ____ 37. The ____ property of a control is used to specify the position of the text within the control. a. AlignText c. Justify b. Alignment d. TextAlign ____ 38. When using the Visual Basic 2005 InputBox function which of the following is the recommended standard? a. sentence capitalization for both prompt and title b. book title capitalization for the title and sentence capitalization for the prompt c. book title capitalization for both prompt and title d. Pascal case for both prompt and title ____ 39. A default button is identified by setting the Windows form's ____ property. a. DefaultButton c. SelectedButton b. AcceptButton d. CancelButton ____ 40. A memory variable that is a Double data type requires ____ bytes of storage. a. 2 c. 6 b. 4 d. 8 3 ____ 41. String and object variables are initialized to ____ when created. a. spaces c. the word "Nothing" b. Nothing (no data at all) d. zero ____ 42. The ____ class contains methods that you can use to convert a numeric value to a specified data type. a. Convert c. Parse b. Format d. Number ____ 43. The ____ of a variable determines where in the program a variable can be used. a. dim c. scope b. type d. extent ____ 44. The Visual Basic 2005 operator that concatenates two or more strings together is ____. a. @ c. & b. % d. # ____ 45. A control's ____ event occurs when the contents of a control's Text property are altered. a. CodeChanged c. ChangedText b. TextChanged d. TextModified ____ 46. The ____ method causes a message box to display on the screen. a. Display c. Show b. Visible d. Prompt ____ 47. If a letter grade of "B" or "A" on a test is determined based upon the following grading scale, which expression would identify an individual earning a "B" or "A" based upon a variable score? 90-100 A 80-<90 B 70-<80 C 60-<70 D 0-<60 F a. score = 80 Or score > 90 c. score >= 80 b. score > 80 And score >=90 d. score < 80 And score >=80 ____ 48. The MessageBox.Show(text, caption, buttons, icon[, default button]) method displays a message box at runtime on your form. Which of the above arguments controls the words appearing in the message box? a. text c. buttons b. caption d. icon ____ 49. The Backspace key is represented by the ____ constant. a. ControlChars.Back c. ControlChars.Backspace b. ControlChars.BackSpace d. ControlChars.Backspc ____ 50. With the KeyPress event, use the e parameter’s ____ property to cancel the key if it is an inappropriate one. a. Check c. KeyChar b. KeyEnter d. Handled 4 Essay (20 points) 51. Differentiate between form-level and local variables; include in your response module scope and procedure scope. 52. Explain the use of handles in a procedure header. 53. In your own words explain class and object. 5 54. Draw the flowchart that corresponds to the following pseudocode. If hours > 40 Display "Overtime pay" Else Display "Regular Pay" End if 6 Answer Section TRUE/FALSE 1. ANS: T PTS: 1 REF: 17 2. ANS: T PTS: 1 REF: 22 3. ANS: T PTS: 1 REF: 30 4. ANS: F PTS: 1 REF: 32 5. ANS: F PTS: 1 REF: 36 6. ANS: F PTS: 1 REF: 40 7. ANS: T PTS: 1 REF: 41 8. ANS: T PTS: 1 REF: 67 9. ANS: F PTS: 1 REF: 67 10. ANS: F PTS: 1 REF: 86 11. ANS: T PTS: 1 REF: 104 12. ANS: F PTS: 1 REF: 104 13. ANS: T PTS: 1 REF: 113 14. ANS: F PTS: 1 REF: 145 15. ANS: F PTS: 1 REF: 188 16. ANS: T PTS: 1 REF: 192 17. ANS: F PTS: 1 REF: 213 18. ANS: F PTS: 1 REF: 286 19. ANS: F PTS: 1 REF: 289 20. ANS: F PTS: 1 REF: 305 MULTIPLE CHOICE 21. ANS: D PTS: 1 REF: 22 22. ANS: B PTS: 1 REF: 22 23. ANS: A PTS: 1 REF: 22 24. ANS: D PTS: 1 REF: 41 25. ANS: C PTS: 1 REF: 53 26. ANS: B PTS: 1 REF: 58 27. ANS: D PTS: 1 REF: 64 28. ANS: B PTS: 1 REF: 64 29. ANS: D PTS: 1 REF: 68 30. ANS: B PTS: 1 REF: 70 31. ANS: D PTS: 1 REF: 103 32. ANS: D PTS: 1 REF: 103 33. ANS: C PTS: 1 REF: 129 34. ANS: C PTS: 1 REF: 154 35. ANS: D PTS: 1 REF: 154 36. ANS: B PTS: 1 REF: 157 37. ANS: D PTS: 1 REF: 165 38. ANS: B PTS: 1 REF: 240 39. ANS: B PTS: 1 REF: 246 40. ANS: D PTS: 1 REF: 188 41. ANS: B PTS: 1 REF: 192 42. ANS: A PTS: 1 REF: 198 7 43. ANS: C PTS: 1 REF: 201 44. ANS: C PTS: 1 REF: 236 45. ANS: B PTS: 1 REF: 271 46. ANS: C PTS: 1 REF: 340 47. ANS: C PTS: 1 REF: 304-305 48. ANS: A PTS: 1 REF: 341 49. ANS: A PTS: 1 REF: 358 50. ANS: D PTS: 1 REF: 357 ESSAY 51. ANS: Form-level variables are declared in the form declaration section and have module scope, meaning that the variable is visible throughout the application or solution. Local variables are only visible in the routine in which they were declared and are said to have procedure scope. 52. ANS: The Handles keyword identifies the objects and the specific events of those objects that will use a procedure or subroutine. 53. ANS: A class is the definition of a control, or a template of a control that describes how it looks and performs. An object is a "copy" of the class that has been instantiated or created on a form for use in the application. 54. ANS: start F if hours T > 40 display display “Regular “Overtime pay” pay” stop 8