Unit 2 and 3 Review Flashcards Preview

Computer Programming > Unit 2 and 3 Review > Flashcards

Flashcards in Unit 2 and 3 Review Deck (49):
1

The proper use of syntax in a programming language is called ____________.
A. modularization
B. programming documentation
C. programming logic
D. programming style


D. programming style

2

Which expresses the step-by-step instructions of an algorithm by using keywords, while depicting logical groupings or structures using indentation?
A. A flowchart
B. A storyboard
C. Methods
D. Pseudocode


D. Pseudocode

3

Which is NOT a characteristic of commenting?
A. Comments begin with a '.
B. Comments begin with a ".
C. Comments can be on their own line or after a line of code.
D. Comments will turn the text green.


B. Comments begin with a ".

4

Which of the choices below is MOST FREQUENTLY considered an expectation for commenting?
A. Not every line should be commented, but any line that performs an operation should
B. Any line that causes confusion should be commented
C. Comment every line
D. At the top of the program there should be comments on the purpose and scope of the program.


B. Any line that causes confusion should be commented

5

In flowchart symbols, which symbol is used to show decisions?
A. Parallelogram
B. Rectangles
C. Ovals
D. Diamonds


D. Diamonds

6

In flowchart symbols, which symbol represents the start and the end process?
A. Parallelogram
B. Rectangles
C. Ovals
D. Diamonds
Response Feedback: 2.02

C. Ovals

7

Which statement would change the color of the form to blue?
A. BackColor(Color.Blue)
B. BackColor.Text = Color.Blue
C. BackColor = Blue
D. BackColor = Color.Blue

D. BackColor = Color.Blue

8

The programming process begins with a meeting between the programmer and the client. Which activity would be the second step in the programming process?
A. Designing the solution
B. Documenting the solution
C. Testing the solution
D. Validating the design


A. Designing the solution

9

What would BEST replace the "?" on Line 4 in the figure?
Begin
get x
get y
?
sum = x + y + z
print sum
End
A. get x + z
B. get z
C. print x
D. print y

B. get z

10

What is most frequently used design in the programming process?
A. Top-Down Design
B. Bottom-Up Design
C. Analysis Design
D. The Spiral Model


A. Top-Down Design

11

What are the methods to show the steps to solve a problem?
A. Algorithm, drawings, sequence
B. Algorithm, flowcharts, pseudocode
C. Algorithm, program code, structure
D. Labels, flowcharts, pseudocode
Response Feedback: 2.02

B. Algorithm, flowcharts, pseudocode

12

The following is an example of what?
Wash hair.
Rinse.
Repeat.
A. A SIMPLESEQUENCE Control Structure
B. A DOWHILE infinite loop
C. A series of instructions
D. A DOWHILE loop


B. A DOWHILE infinite loop

13

Angie is programming an application where the user needs to select their age from five different choices. What is the best control to use?
A. Check box
B. Label
C. Radio Button
D. Textbox

C. Radio Button

14

Which is NOT a characteristic of commenting?
A. Comments can be on their own line or after a line of code.
B. Comments begin with a '.
C. Comments begin with a ".
D. Comments will turn the text green.


C. Comments begin with a ".

15

What is the correct code to create a two line return from the following code?
lblcost. Text = "The cost of the product is: "& (deccost + dectax)
A. lbl.Cost.Show = "The cost of the product is: "vbCrLf & (deccost + dectax)
B. lblCost.Text = "The cost of the product is: " & vbCrLf & (deccost + dectax)
C. lbl.Cost.Show "The cost of the product is: "& (deccost + dectax)
D. lblCost.Text = "The cost of the product is: "vbCrLf & (deccost + dectax)

B. lblCost.Text = "The cost of the product is: " & vbCrLf & (deccost + dectax)

16

What are multi-line comments called?
A. Multiple line
B. Block
C. Single Line
D. Line


B. Block

17

Which control is used to get written input from the user?
A. Button
B. RadioButton
C. TextBox
D. Label


C. TextBox

18

What is an acceptable comment for line 2 of the Visual Basic program below?
Private Sub Form_Load()
MessageBox.Show("Hello World!")
End Sub
A. ! Execute a simple message box that will say "Hello, World!"
B. // Execute a simple message box that will say "Hello, World!"
C. 'Execute a simple message box that will say "Hello, World!"
D. Execute a simple message box that will say "Hello, World!"

C. 'Execute a simple message box that will say "Hello, World!"

19

Tricia decided that the computer program she was designing should be coded in Visual Basic She then began to code the program from her pseudocode. This exemplifies which stage in the programming process?
A. Design the Solution
B. Identify the Problem
C. Test the Program
D. Write the Program


D. Write the Program

20

In a Flowchart, what indicates the flow of logic?
A. Direction of the arrow
B. There is no flow of logic
C. What color the symbol is, follow ROYGBIV pattern
D. Where the symbol is placed


A. Direction of the arrow

21

Greg wants to change the size of the text in a label. Which label property should he change?
A. Font
B. Text
C. (Name)
D. Autosize

A. Font

22

Maggie is programming an ice cream application and has four different toppings: sprinkles, peanuts,almonds, and cherries. Which control would allow the user to choose any or none of the toppings?
A. Label
B. Radio Button
C. Textbox
D. Check box

D. Check box

23

Amy is writing a program to prompt the user for his/her birthdate. What will she use to include the prompton her form?
A. Label
B. Button
C. Textbox
D. Message Box

A. Label

24

Angie is programming an application where the user needs to selct their age from five different choices.Which control is BEST to contain the choices?
A. Label
B. Group Box
C. Radio Button
D. Check Box

B. Group Box

25

All of the following are part of testing except
A. deployment
B. debugging
C. logic errors
D. beta testing

A. deployment

26

What does the example below represent?
1. Obtain two numbers from the user
2. Add the two numbers together
3. Print the two numbers
A. Algorithm
B. Coding
C. Flowchart
D. Pseudocode

A. Algorithm

27

The interaction between the actor and the system can be best described as:
A. Select Case.
B. Use Case.
C. User Case.
D. User Application.
Response Feedback: 2.03

B. Use Case.

28

Which area of the Integrated Development Environment (IDE) is used to change the text displayed in an object on a form?
A. The Toolbox
B. The Properties window
C. The Start Page
D. The Solution Explorer window

B. The Properties window

29

Why is a comment used in Visual Basic?
A. Way to document your program
B. To serve as a user guide
C. To check logic errors
D. Explain logic to users


A. Way to document your program

30

Which one of the choices below is NOT a Basic Control Stucture?
A. Simple Sequence control structure
B. Conditional Control Structure
C. Iteration control Structure
D. Pseudocode Control Structures


D. Pseudocode Control Structures

31

How do algorithms and cooking recipes compare?
A. Algorithms are long and recipes are short.
B. Both are always easy to follow.
C. Both are sequences of instructions.
D. Recipes are detailed and algorithms are not.

C. Both are sequences of instructions.

32

Why is documentation of programs important?
A. It's required for successful compiling
B. Programs may not make sense without proper documentation.
C. It turns the code blue.
D. The compiler reads it and adds the documentation to the code.


B. Programs may not make sense without proper documentation.

33

Which of the choices is NOT an expectation for commenting?
A. Not every line should be commented, but any line that performs an operation should be.
B. Any line that causes confusion should be commented.
C. Comment every line.
D. At the top of the program there should be comments on the purpose and scope of the program.
Response Feedback: 2.03

C. Comment every line.

34

The programming process begins with a meeting between the programmer and the client. Which of the following activities would be the third activity in the programming process?
A. Test the program
B. Write the program
C. Design the solution
D. Identify the problem
Response Feedback: 2.01

B. Write the program

35

What BEST describes the output for the program designed below?
Begin
sum = number1 + number2 + number3 + number4 +number5
avg = sum/5
Print avg
End
A. The average of six numbers
B. The average of five numbers
C. The comparison of five numbers
D. The total sum of five numbers


B. The average of five numbers

36

What is a set of steps that create an ordered approach to a problem solution called?
A. Pseudocode
B. Flowcharting
C. Algorithm
D. Modularization
Response Feedback: 2.01

C. Algorithm

37

Which step should NOT be taken when planning an application?
A. Code the user interface.
B. Design the user interface.
C. Identify the events required to trigger an object into performing its assigned tasks.
D. Identify the tasks the application needs to perform and the objects to which you will assign the tasks.
Response Feedback: 2.01

A. Code the user interface.

38

What is a list of instructions that contain data for a computer to follow called?
A. Computer program
B. Algorithm
C. Flowchart
D. Pseudocode

A. Computer program

39

Which of the following is an example of pseudocode?
A. If button is clicked then
add the numbers
else
display a message
B. If btnSum.Clicked Then
intSum = intNum1 + intNum2
else
MessageBox.Show("Don't you want to know the answer?")
End If
C. 1. Click the button
2. Add the numbers
3. Show the answer
D. To get the sum, click the button
Response Feedback: 2.01

A. If button is clicked then
add the numbers
else
display a message

40

What is an advantage of using modularization in computer programming?
A. Anyone who codes can work on the solution.
B. Each sub-problem can be solved in a few steps.
C. More programmers are required to solve the problem.
D. More time can be spent programming the solution.


B. Each sub-problem can be solved in a few steps.

41

The following code segment is an example of what?
'Purpose: To calculate the direction of the ball
'Author: John Doe
'Date: 10Nov11
A. Functional Requirement
B. Line Comment
C. Three individual comments
D. Use Case
Response Feedback: 2.03

C. Three individual comments

42

Which window displays the application interface and allows objects to be added, deleted, or resized?
A. The Design window
B. The Code window
C. The application window
D. The Start window

A. The Design window

43

Which project type is a desktop application run directly by the end user via forms appearing on the desktop?
A. Common Application
B. Forms Application
C. User Application
D. Windows Application


D. Windows Application

44

What is an algorithm?
A. A mix of English and code.
B. A set of steps that create an ordered approach to a problem solution.
C. Uses symbols to represent code.
D. The proper use of syntax in programming.


B. A set of steps that create an ordered approach to a problem solution.

45

Why is a flowchart used to design a programming solution?
A. To eliminate possible syntax errors in the program solution
B. To input all code needed for programming the problem solution
C. To minimize logic errors by graphically showing steps in solution
D. To show a list of all statements needed to solve the problem

C. To minimize logic errors by graphically showing steps in solution

46

In flowchart symbols, which symbol is used to show processes?
A. Parallelogram
B. Rectangles
C. Ovals
D. Diamonds

B. Rectangles

47

Which property value identifies a control in code?
A. Text
B. Autosize
C. Font
D. (Name)

D. (Name)

48

Which design approach should be considered when several programs all require similar functionality?
A. Menu
B. Object-oriented
C. Procedural
D. Subclass

B. Object-oriented

49

In flowchart symbols, which symbol shows the input/output?
A. Parallelogram
B. Rectangles
C. Ovals
D. Diamonds

A. Parallelogram