Unit 2 and 3 Review Flashcards

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

D. programming style

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q
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
A

D. Pseudocode

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

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.

A

B. Comments begin with a “.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

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.

A

B. Any line that causes confusion should be commented

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q
In flowchart symbols, which symbol is used to show decisions?
A. Parallelogram
B. Rectangles
C. Ovals
D. Diamonds
A

D. Diamonds

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q
In flowchart symbols, which symbol represents the start and the end process?
A. Parallelogram
B. Rectangles
C. Ovals
D. Diamonds
Response Feedback:	2.02
A

C. Ovals

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q
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
A

D. BackColor = Color.Blue

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q
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

A. Designing the solution

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q
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
A

B. get z

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q
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

A. Top-Down Design

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q
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
A

B. Algorithm, flowcharts, pseudocode

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q
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
A

B. A DOWHILE infinite loop

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q
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
A

C. Radio Button

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

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.

A

C. Comments begin with a “.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

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)

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q
What are multi-line comments called?
A. Multiple line
B. Block
C. Single Line
D. Line
A

B. Block

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q
Which control is used to get written input from the user?
A. Button
B. RadioButton
C. TextBox
D. Label
A

C. TextBox

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

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!”

A

C. ‘Execute a simple message box that will say “Hello, World!”

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q
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
A

D. Write the Program

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

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

A. Direction of the arrow

21
Q
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

A. Font

22
Q
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
A

D. Check box

23
Q
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

A. Label

24
Q
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
A

B. Group Box

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

A. deployment

26
Q
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

A. Algorithm

27
Q
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
A

B. Use Case.

28
Q
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
A

B. The Properties window

29
Q
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

A. Way to document your program

30
Q
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
A

D. Pseudocode Control Structures

31
Q

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.

A

C. Both are sequences of instructions.

32
Q

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.

A

B. Programs may not make sense without proper documentation.

33
Q

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

A

C. Comment every line.

34
Q
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
A

B. Write the program

35
Q
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
A

B. The average of five numbers

36
Q
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
A

C. Algorithm

37
Q

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

A. Code the user interface.

38
Q
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

A. Computer program

39
Q
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

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

40
Q

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.

A

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

41
Q
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
A

C. Three individual comments

42
Q
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

A. The Design window

43
Q
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
A

D. Windows Application

44
Q

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.

A

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

45
Q

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

A

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

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

B. Rectangles

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

D. (Name)

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

B. Object-oriented

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

A. Parallelogram