Posted: November 14th, 2015

Midterm Exams

Midterm Exams

Multiple Choice
Identify the choice that best completes the statement or answers the question.
____ 1. Users employ GUI objects to ____.
a. select options c. cause events to occur
b. enter data d. all of the above
____ 2. The project name will be displayed on the ____ of the Visual Studio window.
a. status bar c. toolbar
b. title bar d. Toolbox
____ 3. A Label object can be centered on the Windows Form object by using choices

on the ____ menu.
a. File c. Format
b. Edit d. Tools
____ 4. When you click the Start Debugging button, the program is ____ and saved,

and then is run on the computer.
a. executed c. compiled
b. linked d. imported
____ 5. A(n) ____ data type must be used in arithmetic operations.
a. string c. character
b. numeric d. either A or B
____ 6. A prefix of ____ is used to denote a variable defined as a Char data type.
a. str c. txt
b. chr d. wrd
____ 7. The character C is the literal-type character for the ____ data type.
a. Char c. Integer
b. Short d. Decimal
____ 8. What is the value of the MsgBoxStyle.OKOnly?
a. 0 c. 2
b. 1 d. 3
____ 9. A(n) ____ is a single repetition of a loop.
a. rotation c. revolution
b. iteration d. accumulation
____ 10. Creating a Web application is similar to creating a(n) ____ application.
a. hosted c. inactive
b. Windows d. data-driven
____ 11. The ____ procedure of the String class is used to remove spaces from the

a. TrimSpaces c. Trim
b. TrimEnds d. TrimEndSpaces
____ 12. Using the ____ procedure will cause the application to wait a specific

amount of time.
a. Stop c. Wait
b. Pause d. Sleep
____ 13. The ____ prefix is used when naming a ComboBox object

like the one in the accompanying figure.
a. cmb c. cbx
b. cbo d. cmo
____ 14. A ____ procedure can return only one value back to the calling procedure.
a. Value c. Return
b. Sub d. Function
____ 15. Select the correct syntax to declare an array named intReservations with

10 Integer elements.
a. Dim intReservations(9) as Integer c. Dim intReservations[9] as Integer
b. Dim intReservations(10) as Integer d. Dim intReservations[10] as Integer
____ 16. Arrays that are ____ can be resized at run time.
a. static c. dynamic
b. noninteractive d. parallel
____ 17. The BinarySearch procedure returns ____ if the desired value is found in

the array.
a. the element’s value c. 1
b. the matching index value d. -1
____ 18. In Visual Basic, an array can have up to ____ dimensions.
a. 4 c. 32
b. 16 d. 64
____ 19. The ____ object is used to write text to a text file.
a. TextSave c. Streamer
b. StreamSave d. StreamWriter
____ 20. The ____ procedure takes a form out of view.
a. Remove c. Hide
b. Minimize d. Vanish
Indicate whether the statement is true or false.
____ 21. In order for the computer to execute a program, or carry out the

instructions in the program, only the data
must be placed in the computer’s random access memory (RAM).
____ 22. A logical operation can be used to determine if two values are equal, if

one value is greater than the other, or
if one value is less than the other.
____ 23. When the Toolbox is in Dockable mode, it cannot be moved.
____ 24. Programming code is the set of rules used to specify how each statement

must be written.
____ 25. The style of the text displayed in a TextBox object can be set using the

Font property.
____ 26. Integer variables can be used to store fractional values.
____ 27. Only one breakpoint can be set in a program, as shown in the accompanying

____ 28. The Length property returns the highest index element in the array.
____ 29. A sequential search is the most efficient way of searching for an element.
____ 30. A variable’s access specifier determines what other forms may access it.
Complete each statement.
31. When you enter a statement using IntelliSense, by default, IntelliSense will

format the statement after you
press the ___________________ key.
32. The ____________________ Wizard is used to publish a program using ClickOnce

33. An opening screen that appears as an application is loading is called a(n)

____________________ screen.
34. Passing an argument ____________________ allows the procedure to modify the

contents of the variable that
is being passed.
35. An array with two indexes for each element is a(n) ____________________ array.
Identify the letter of the choice that best matches the phrase or definition.
a. templates f. .NET components
b. Dockable g. PictureBox
c. blue h. lbl
d. sizing handles i. red
e. title bar j. btn
____ 36. When creating a new project using Visual Studio, the types of programs

that can be created are shown as
____ 37. After a project has been created in Visual Studio, the project name will

be displayed on this part of the Visual
Studio IDE
____ 38. The graphical objects that can be used to design the user interface
____ 39. The Pushpin icon on the Auto Hide button of the Toolbox will appear in a

vertical position when the Toolbox
is in this mode
____ 40. When an object is selected on a Windows Form object, these will appear on

the object
____ 41. When the mouse pointer is inside this kind of object, it changes to a

crosshair with four arrowheads
____ 42. A Button object’s name should have this prefix
____ 43. Kind of snap line that indicates that the edges of two objects are

vertically aligned
____ 44. Kind of snap line that indicates text within an object is aligned with the

text in another object
____ 45. A Label object’s name should have this prefix
Critical Thinking Questions
Case 2-2
You and Ellen are cramming for your exam about the second phase of the

program development life cycle,
the design of the user interface.
46. As you recount the design principles to Ellen during your study session, which

of the following is NOT one
that you share with her?
a. If the user interface is too simple to use, the user will not trust that it is

sufficiently robust.
b. Use of the interface should feel natural and normal.
c. A good user interface provides the most appropriate object for each requirement.
d. The objects in the interface must be arranged in the sequence in which they are

used so the
user can move from item to item on the screen in a logical, straightforward manner.
Critical Thinking Questions
Case 4-1
Brian is trying his best to understand the concept of variable scope, so he calls

his friend Molly for guidance.
47. Brian has defined a variable named strNumberOfSongs within the click event

handle for a Submit button, and
he has been frustrated in his efforts to refer to this variable in the click event

handler for a Clear button. What
does Molly tell him is going on?
a. The variable strNumberOfSongs has no
c. The variable strNumberOfSongs was not
declared correctly.
b. The variable strNumberOfSongs is a local
d. The variable strNumberOfSongs is a
global variable.
Critical Thinking Questions
Case 4-2
The arithmetic operators in your program are not behaving the way you think they

should be, so you decide to
brush up on your operators and the hierarchy of operations.
48. What is the correct order among the following operations?
a. exponentiation, multiplication, integer division, MOD, addition
b. multiplication, exponentiation, MOD, integer division, addition
c. integer division, multiplication, exponentiation, MOD, addition
d. multiplication, integer division, exponentiation, MOD, addition
Critical Thinking Questions
Case 5-1
You have written the code below and you want to step through it with some actual

values to make sure that it
is working in practice the way you expect it to work.
If decGPA > 3.5 Then
If intSatScore > 1000 Then
lblAdmissionsStatus.Text = “You have earned admission”
lblAdmissionsStatus.Text = “Retake the SAT exam”
If intSatScore > 1200 Then
lblAdmissionsStatus.Text = “You have earned probationary admission
lblAdmissionStatus.Text = “You have been denied admission”
End If
End If
49. Assuming that an applicant has a GPA of 3.55, what is the value of

lblAdmissionsStatus.Text if the
applicant’s SAT score is 1000?
a. Retake the SAT exam c. You have earned probationary admission
b. You have earned admission d. You have been denied admission
Critical Thinking Questions
Case 8-1
Of all of the concepts Sheila has learned so far, she is having the hardest time

understanding the use of
procedures, including when and how to use them. She asks her instructor for some

additional clarification.
50. Sheila is having trouble even deciding whether or not to place a set of

programming steps in a Sub procedure
or a Function procedure, so her instructor tells her to ask herself a series of

questions to make that decision.
Which one of the following is NOT a question that the instructor suggests that she

ask herself?
a. Will the program be easier to read if the
code is placed in a separate procedure?
c. Does this task require more than eight or
nine programming statements?
b. Does the proposed code perform a single
d. Can the Sub procedure or Function
procedure perform its processing by
receiving data as arguments, and by returning
data either using the Return statement or by
using ByRef arguments?


Expert paper writers are just a few clicks away

Place an order in 3 easy steps. Takes less than 5 mins.

Calculate the price of your order

You will get a personal manager and a discount.
We'll send you the first draft for approval by at
Total price:
Live Chat+1-631-333-0101EmailWhatsApp