STUDENT TEST BOOKLET

This test section contains Twenty-four multiple-choice questions. Please mark your answers for the multiple-choice questions in the spaces provided on your Student Response Booklet. Mark only one answer for each question. If you do not know the answer, make your best guess. DO NOT WRITE ANY ANSWERS IN THIS TEST BOOKLET. WHEN YOU FINISH, DO NOT WORK ON ANY OTHER TEST SECTION.
1. / Robert has been contacted by ABC Farm Supply to build a computer program to help them enter customer’s names, addresses and phone numbers each time they visit the store. Which of the following would best allow Robert to accomplish this task?
A. / Command Buttons
B. / Image Boxes
C. / Labels
D. / Text Boxes
2. / Rachel has recently modified a program for the Pizza & Pasta Shop. One of the requests from the employees at the Pizza and Pasta Shop was an easy way to end the program. Which of the following would accomplish this task while using Visual Basic?
A. / Insert a Label with the caption of End.
B. / Insert an image of a stop sign into the program and after double clicking on the image type Image1.caption = “End”
C. / Insert a textbox so that the user can type the text End to stop the program.
D. / Insert a command button, change the caption to End and after double clicking the command button type the code END
3. / Ruth and Robbie both work for Nelson’s Programming Shop as head programmers for their division. Recently Ruth and Robbie have had a disagreement over Image boxes, the operation of image boxes and the properties associated with image boxes. Select the statement below that is not true concerning image boxes.
A. / Image boxes can be used to perform operations such as stopping a program or displaying information within the program screen.
B. / The Image property stretch allows the picture to be resized so that it can fit into the image box designed by the user.
C. / The image box property visible allows the image to be hidden or displayed during program execution.
D. / Image boxes cannot be stacked on top of each other because this will cause coding issues.
4. / Roberta was recently asked to examine a section of code that was found inside a program being used at an insurance agency. The section of code that Roberta was handed was as follows: Text1.Text = Val(Text2.text) * .06. Select the statement below that best explains this mathematical equation.
A. / Text1 and the value of text two if equal to each other will be multiplied by .06
B. / The program will end if the value inside of Text2 is .06
C. / The program will multiply the value entered in text2 by .06
D. / The program will display the result of text1.text * .06 in Text2

PLEASE GO ON TO THE NEXT PAGE è

5. / Ramsey has been asked to design a T-Shirt program in which the user can enter their name, address and phone number on one form and then have it displayed on another form. Ramsey has decided to use a module. Which of the following is an incorrect statement about a module?
A. / Modules only require code to be entered with no design work being required by the programmer.
B. / Modules are saved separately from program files and can be included within other computer programs as needed.
C. / Modules can contain multiple variables and storage locations for various data that is used within a computer program.
D. / Modules are required in all programs that are designed in visual basic even though they may contain no code.

** Use the following screen shot to answer questions (6-9)**

6. / Rashad is trying to ensure that when a user enters data into text1 and text2 and wants to clear the information from the textboxes that command1 can be pressed to perform this operation. What code would be inserted into this command button?
A. / Text1.text = CLEAR
Text2.text = CLEAR
B. / Text1.text = “Clear”
Text2.text = “Clear”
C. / Text1.caption = “”
Text2.caption = “”
D. / Text1.text = “”
Text2.text = “”
7. / The state sales tax has changed and RoLo needs to update the program to calculate sales tax using 6 percent. Which of the following statements would allow the user to enter the price in Text1, click on command 1 and then display the sales tax amount in Text 2?
A. / Text2. Text = val(text1.text) * 6%
B. / Text1.text = val(text2.text) * 6%
C. / Text2.text = val(text1.text) * .06
D. / Text2.text = val(text1.text) * .6

PLEASE GO ON TO THE NEXT PAGE è

8. / Reese wants to add two image boxes into the program with the names of Image1 and Image2. He wants to be able to click on command1 and have Image1 to display on the screen and Image2 to hide on the screen. Reese has set the visible property for both images to false. What code needs to be entered so that the correct image will show and the correct image will hide?
A. / Image1.visible = false
Image2.visible = true
B. / Image1.visible = true
Image2.visible = false
C. / This cannot be performed within Visual Basic
D. / Image1.visible = show
Image2.visible = hide
9. / Red recently realized that the wrong form was loading first within his program. Which of the following steps would correctly fix Red’s problem?
A. / Copy the form that needs to open first and paste all the code into a module so that it will open first
B. / Debug the program and set a breakpoint within the form that needs to display first.
C. / Write a section of code within the form that needs to display first where the form knows that its priority number is one within the startup procedure
D. / Utilize the Project Properties menu to select which form needs to display first in the program.

Use the following article to answer questions 10 –12

Programming Languages

The language a computer can understand (called “machine code”) is composed of strings of zeros and ones. This smallest element of a computer’s language is called “a bit” ? 0 or 1. Four bits are a nibble. Two nibbles (8 bits) equal a byte. The words of a computer language are the size of a single instruction encoded in a sequence of bits (for example, many computers speak a language with words that are ‘32-bits’ long).

As machine code is extremely difficult to work with, a type of language called Assembly was soon developed. Using an assembly language, programmers use series of mnemonics that are then translated by a program into machine code that the computer can understand. However, assembly is very similar to machine code in that all procedures have to be spelt out in exact detail in a process that is extremely difficult, slow and prone to errors.

Translators (Compilers and Interpreters)

Grace Hopper is credited with pioneering the idea of a compiler to translate some more human-friendly language into the language of a computer. These more human-friendly languages are called higher level languages and were developed to allow programmers to concentrate more closely on the abstract problem to be solved rather than all the painful detail required for machine code or assembly language programming.

PLEASE GO ON TO THE NEXT PAGE è

A compiler converts source code written in some high-level language into executable machine code (also called binary code or object code). The resulting machine code can only be understood by a specific processor, such as a Pentium or PowerPC.

An interpreter translates either source code or tokens into machine code, one instruction at a time, as the program is run. An interpreter does not generate machine code from a source program.

High level languages

One of the first ‘higher level’ languages that gets wide use is FORTRAN, first released in 1957. This language is very good at number crunching, but not so good at input and output. COBOL, released soon after, was “designed from the ground up as the language for businessmen” and used “a very English-like grammar”1.

These languages are generally considered to reflect a ‘procedural’ paradigm of programming. In 1958, John McCarthy at M.I.T. began work on LISP which goes on to become one of the most important languages in the area of “Artificial Intelligence”. LISP, which gets its name from LISt Processing, reflects a language model based on recursive functions. Another language, PROLOG, invented in the 70s, used a model based on ‘logic programming’ with predicate calculas

Use the above article to answer questions 10 –12

10. / What is the main idea of this passage?
A. / Computer programmers need to learn multiple languages so that they can meet end user requirements.
B. / Programming languages take many different forms and other programs help support these languages so that both human and computer can understand.
C. / Computer programming has been around for several years but remains unchanged.
D. / Computers are simple machines that work on everyday, easy to understand commands from the programmer.
11. / Which of the following is not a logical inference from the passage?
A. / Machine code is composed of English like statements.
B. / Fortran and Cobol are considered to reflect a procedural paradigm of programming.
C. / A compiler allows human code to be converted into computer code
D. / Machine code has to be very specific and detailed.
12. / From information in the last section, what can we assume about a higher-level language?
A. / is more complicated than standard machine code
B. / is more computer friendly code
C. / is generally designed for specific purposes and uses
D. / is more expensive to update and maintain than lower level languages

PLEASE GO ON TO THE NEXT PAGE è

13. / Reuben has been asked by his boss at Video Plus to place the entire movie inventory into a computer-based program for employees to use to select movies for purchase. Reuben wishes to design a program in which the user can select multiple items from the store to purchase at once. What selection should Reuben make?
A. / Utilize option buttons that are built within a frame so that multiple items can be selected.
B. / Insert a command button that will require the user to type in the movie title and then select a search button that will display the movie on the program screen.
C. / Write an If statement that will check to see what movie has been selected from a timer control hidden within the program.
D. / Add check boxes into a frame so that multiple items can be selected.
14. / Riley is currently developing a program that will allow car shoppers to select and view an interior color when an option button is selected. Which of the following code segments should be placed into a command button so that when option1 is selected, image 1 appears on the screen?
A. / If option1.value = 1 then
Image1.visible = true
End if
B. / If option1.value = true then
Image1.visible = true
End if
C. / Image1.visible = true
D. / If option1.value = true then
Image1.visible = false
End if
15. / Rossa has been asked to speak to all junior programmers about the selection process between option buttons and check boxes. Which of the following statements would be accurate information for Rossa to include within her presentation?
A. / Check boxes are used to help a user select multiple items within a program. Option buttons are used to help a user make a single selection within a program.
B. / Check boxes require less code than an option button within a program.
C. / Check boxes and option buttons are only different based on appearance within the program. The coding for both buttons is identical.
D. / Check boxes and option buttons should not be utilized within the same program due to both being selection control buttons. The coding within the program would produce an error message.

PLEASE GO ON TO THE NEXT PAGE è

16. / Ranisha wants to build a program that will allow her first form to display for 10 seconds before it advances to the 2nd form automatically. What item will Ranisha need to insert into her program so that it advances after 10 seconds?
A. / A breakpoint
B. / A module
C. / A timer
D. / A variable
17. / Label2.caption = val(Text1.text) + val(label3.caption).
Which of the following statements explains the operation of the above section of code?
A. / The value of text1 will be added to the value of label3.caption and will be stored into a variable
B. / Label2 will be added to the values found in text1 and label3
C. / Text1 and label3 will be added together and the result will be placed in label2
D. / The program will issue an error due to label3 not being the same type as the text box being used with the first value.
18. / Ruma is working on listing her favorite songs in a combo box within a visual basic program. Ruma wants a picture of the band to display when a song that they perform is selected within the combo box. What code would Ruma need to use within her combo box to make the pictures display correctly?
A. / Image1.visible = true will be placed into the list section for each song that is represented. The only change in code will be the number that appears after the word Image
B. / If combo1.text = “Insert Song Name” Then
Image1.visible = true
Image2.visible = false **All other images would be set to false below this section.
End if
C. / If combo1.value = “Insert Song Name “ then
Image1.visible = true
End if
D. / The code would be inserted into multiple sections of the program so that each group is included and a picture would show up correctly on the screen.

PLEASE GO ON TO THE NEXT PAGE è