Deck 7: Case Control Structure

Full screen (f)
exit full mode
Question
A CASE control structure can be used in place of a

A)sequential IFTHENELSE control structure
B)nested IFTHENELSE control structure
C)null IFTHENELSE control structure
D)both a and b
Use Space or
up arrow
down arrow
to flip the card.
Question
Given the following pseudocode,what value of GRADENUM must be input to output a grade of "C"?
Start
Read GRADENUM
CASENTRY GRADENUM
CASE 9090 \leq GRADENUM 100\leq 100 GRADE == "A'
CASE 8080 \leq GRADENUM <90< 90 GRADE == 'B'
CASE 7070 \leq GRADENUM <80< 80 GRADE == "C'
CASE 6060 \leq GRADENUM <70< 70 GRADE == "D'
CASE other
GRADE == "F"
ENDCASE
Write GRADE
Stop

A)70 or more
B)79 or less
C)80 or less
D)none of the above
Question
Given the following pseudocode,how many conditions will be tested if TRANSCODE is a Withdrawal?
Start
Read TRANSCODE
CASENTRY TRANSCODE
CASE "Receipt"
Process B000
CASE" Order"
Process B010
CASE "Withdrawal"
Process B020
CASE "Adjustment"
Process B030
ENDCASE
Write GRADE
Stop

A)0
B)1
C)2
D)3
Question
Given the following pseudocode,what value of GRADE will be output if 60 is input?
Start
Read GRADENUM
CASENTRY GRADENUM
CASE 6060 \leq GRADENUM 80\leq 80
GRADE == "A"
CASE 5959 \leq GRADENUM 60\leq 60
GRADE == "B"
CASE 5050 \leq GRADENUM <60< 60
GRADE == "C"
CASE other
GRADE == "No Grade"
ENDCASE
Write GRADE
Stop

A)A
B)B
C)C
D)No Grade
Question
In a CASE control structure,the test that is most likely to reveal a true outcome should be placed last.
Question
Given the following pseudocode,what value of GRADE will be output if 60 is input?
Start
Read GRADENUM
CASENTRY GRADENUM
CASE 9090 \leq GRADENUM 100\leq 100 GRADE == "A'
CASE 8080 \leq GRADENUM <90< 90 GRADE = 'B'
CASE 7070 \leq GRADENUM <80< 80 GRADE = "C'
CASE 6060 \leq GRADENUM <70< 70 GRADE == 'D'
CASE other
GRADE = "F"
ENDCASE
Write GRADE
Stop

A)B
B)C
C)D
D)F
Question
Records kept for reference purposes as relatively permanent data constitute a

A)master file
B)transaction file
C)detail file
D)both b and c
Question
Given the following pseudocode,what value of GRADE will be output if 60 is input?
Start
Read GRADENUM
CASENTRY GRADENUM
CASE 60<60 < GRADENUM 80\leq 80 GRADE == "A"

CASE 5959 \leq GRADENUM 60\leq 60 GRADE == "B"
CASE 50<50 < GRADENUM 60\leq 60 GRADE == " C\mathrm { C } ",
CASE other
GRADE = "No Grade"
ENDCASE
Write GRADE
Stop

A)A
B)B
C)C
D)No Grade
Question
Given the following pseudocode,what value of GRADE will be output if 60 is input?
Start
Read GRADENUM
CASENTRY GRADENUM
CASE 6161 \leq GRADENUM 80\leq 80
GRADE = "A"
CASE 5959 \leq GRADENUM 60\leq 60 GRADE == "B"
CASE 5050 \leq GRADENUM <60< 60 GRADE == "C"
CASE other
GRADE = "No Grade",
ENDCASE
Write GRADE
Stop

A)A
B)B
C)C
D)No Grade
Question
In a CASE control structure,every test requires an exit connector on the flowchart and an ENDCASE statement in the pseudocode.
Question
It is good programming practice to include an other path in every CASE control structure.
Question
A nested IFTHENELSE control structure is generally easier to work with than a CASE control structure.
Question
Current activities like changes and corrections made to a relatively permanent file constitute a

A)master file
B)transaction file
C)detail file
D)both b and c
Question
In the following pseudocode,the value for TRANSCODE is an example of a(n)?
Start
Read TRANSCODE
CASENTRY TRANSCODE
CASE "Receipt"
Process B000
CASE "Order"
Process B010
CASE "Withdrawal"
Process B020
CASE "Adjustment"
Process B030
ENDCASE
Write GRADE
Stop

A)character string
B)character-string constant
C)alphabetic variable
D)both a and b
Question
Given the following pseudocode,what value of GRADENUM can be input to output a grade of "B"?
Start
Read GRADENUM
CASENTRY GRADENUM
CASE 9090 \leq GRADENUM 100\leq 100
GRADE == "A"
CASE 8080 \leq GRADENUM 90\leq 90 GRADE == "B"
CASE 7070 \leq GRADENUM 80\leq 80
GRADE = "C"
CASE 6060 \leq GRADENUM 70\leq 70
GRADE = "D"
CASE other
GRADE == "F""
ENDCASE
Write GRADE
Stop

A)80
B)90
C)less than 80
D)greater than 90
Question
Given the following pseudocode,how many conditions will be tested if 60 is input?
Start
Read GRADENUM
CASENTRY GRADENUM
CASE 60<60 < GRADENUM 80\leq 80
GRADE == "A'
CASE 5959 \leq GRADENUM <60< 60
GRADE == "B"
CASE 50<50 < GRADENUM 60\leq 60
GRADE == "C'
CASE other
GRADE = "No Grade"
ENDCASE
Write GRADE
Stop

A)1
B)2
C)3
D)4
Question
Given the following pseudocode,how many conditions will be tested if 70 is input?
Start
Read GRADENUM
CASENTRY GRADENUM
CASE 60<60 < GRADENUM 80\leq 80
GRADE == "A'
CASE 5959 \leq GRADENUM 70\leq 70
GRADE == "B'
CASE 50<50 < GRADENUM 60\leq 60
GRADE == "C'
CASE other
GRADE == "No Grade"
ENDCASE
Write GRADE
Stop

A)1
B)2
C)3
D)4
Question
We can replace the nested IFTHENELSE control structure with the CASE control structure.
Question
Given the following pseudocode,what value of GRADENUM can be input to output a grade of "F"?
Start
Read GRADENUM
CASENTRY GRADENUM
CASE 9090 \leq GRADENUM 100\leq 100 GRADE = "A"
CASE 8080 \leq GRADENUM 90\leq 90 GRADE = "B"
CASE 7070 \leq GRADENUM 80\leq 80 GRADE == "C"
CASE 6060 \leq GRADENUM 70\leq 70 GRADE = "D"
CASE other
GRADE == "F"
ENDCASE
Write GRADE
Stop

A)59
B)60
C)61 or less
D)none of the above
Question
In the following pseudocode,the value for WITHDRAWAL is an example of a(n)?
Start
RECEIPT = "Receipt"
ORDER = "Order"
WITHDRAWAL == "Withdrawal"
ADJUSTMENT = "Adjustment",
Read TRANSCODE
CASENTRY TRANSCODE
CASE RECEIPT
Process B000
CASE ORDER
Process B010
CASE WITHDRAWAL
Process B020
CASE ADJUSTMENT
Process B030
ENDCASE
Write GRADE
Stop

A)character string
B)character-string constant
C)alphabetic variable
D)both a and b
Question
The order in which tests are placed in a CASE control structure does not matter.
Question
A character string is set up once and never changes during program execution.
Question
The steps within each CASE path are always grouped together in a module.
Question
The top-to-bottom arrangement of the conditions in the CASE control structure dictates the actual order that the tests will be made by the computer.
Question
The pseudocode form of a CASE control structure always contains exactly three levels of indentation regardless of how many tests are made.
Question
An alphabetic value that is input during processing is called a character string.
Question
There should be the same number of steps in each CASE path.
Question
The CASE control structure is one of the three basic control structures.
Question
A master file contains data that is relatively permanent and not highly subject to change.
Question
A transaction file is also known as a detail file.
Unlock Deck
Sign up to unlock the cards in this deck!
Unlock Deck
Unlock Deck
1/30
auto play flashcards
Play
simple tutorial
Full screen (f)
exit full mode
Deck 7: Case Control Structure
1
A CASE control structure can be used in place of a

A)sequential IFTHENELSE control structure
B)nested IFTHENELSE control structure
C)null IFTHENELSE control structure
D)both a and b
B
2
Given the following pseudocode,what value of GRADENUM must be input to output a grade of "C"?
Start
Read GRADENUM
CASENTRY GRADENUM
CASE 9090 \leq GRADENUM 100\leq 100 GRADE == "A'
CASE 8080 \leq GRADENUM <90< 90 GRADE == 'B'
CASE 7070 \leq GRADENUM <80< 80 GRADE == "C'
CASE 6060 \leq GRADENUM <70< 70 GRADE == "D'
CASE other
GRADE == "F"
ENDCASE
Write GRADE
Stop

A)70 or more
B)79 or less
C)80 or less
D)none of the above
none of the above
3
Given the following pseudocode,how many conditions will be tested if TRANSCODE is a Withdrawal?
Start
Read TRANSCODE
CASENTRY TRANSCODE
CASE "Receipt"
Process B000
CASE" Order"
Process B010
CASE "Withdrawal"
Process B020
CASE "Adjustment"
Process B030
ENDCASE
Write GRADE
Stop

A)0
B)1
C)2
D)3
3
4
Given the following pseudocode,what value of GRADE will be output if 60 is input?
Start
Read GRADENUM
CASENTRY GRADENUM
CASE 6060 \leq GRADENUM 80\leq 80
GRADE == "A"
CASE 5959 \leq GRADENUM 60\leq 60
GRADE == "B"
CASE 5050 \leq GRADENUM <60< 60
GRADE == "C"
CASE other
GRADE == "No Grade"
ENDCASE
Write GRADE
Stop

A)A
B)B
C)C
D)No Grade
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck
5
In a CASE control structure,the test that is most likely to reveal a true outcome should be placed last.
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck
6
Given the following pseudocode,what value of GRADE will be output if 60 is input?
Start
Read GRADENUM
CASENTRY GRADENUM
CASE 9090 \leq GRADENUM 100\leq 100 GRADE == "A'
CASE 8080 \leq GRADENUM <90< 90 GRADE = 'B'
CASE 7070 \leq GRADENUM <80< 80 GRADE = "C'
CASE 6060 \leq GRADENUM <70< 70 GRADE == 'D'
CASE other
GRADE = "F"
ENDCASE
Write GRADE
Stop

A)B
B)C
C)D
D)F
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck
7
Records kept for reference purposes as relatively permanent data constitute a

A)master file
B)transaction file
C)detail file
D)both b and c
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck
8
Given the following pseudocode,what value of GRADE will be output if 60 is input?
Start
Read GRADENUM
CASENTRY GRADENUM
CASE 60<60 < GRADENUM 80\leq 80 GRADE == "A"

CASE 5959 \leq GRADENUM 60\leq 60 GRADE == "B"
CASE 50<50 < GRADENUM 60\leq 60 GRADE == " C\mathrm { C } ",
CASE other
GRADE = "No Grade"
ENDCASE
Write GRADE
Stop

A)A
B)B
C)C
D)No Grade
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck
9
Given the following pseudocode,what value of GRADE will be output if 60 is input?
Start
Read GRADENUM
CASENTRY GRADENUM
CASE 6161 \leq GRADENUM 80\leq 80
GRADE = "A"
CASE 5959 \leq GRADENUM 60\leq 60 GRADE == "B"
CASE 5050 \leq GRADENUM <60< 60 GRADE == "C"
CASE other
GRADE = "No Grade",
ENDCASE
Write GRADE
Stop

A)A
B)B
C)C
D)No Grade
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck
10
In a CASE control structure,every test requires an exit connector on the flowchart and an ENDCASE statement in the pseudocode.
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck
11
It is good programming practice to include an other path in every CASE control structure.
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck
12
A nested IFTHENELSE control structure is generally easier to work with than a CASE control structure.
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck
13
Current activities like changes and corrections made to a relatively permanent file constitute a

A)master file
B)transaction file
C)detail file
D)both b and c
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck
14
In the following pseudocode,the value for TRANSCODE is an example of a(n)?
Start
Read TRANSCODE
CASENTRY TRANSCODE
CASE "Receipt"
Process B000
CASE "Order"
Process B010
CASE "Withdrawal"
Process B020
CASE "Adjustment"
Process B030
ENDCASE
Write GRADE
Stop

A)character string
B)character-string constant
C)alphabetic variable
D)both a and b
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck
15
Given the following pseudocode,what value of GRADENUM can be input to output a grade of "B"?
Start
Read GRADENUM
CASENTRY GRADENUM
CASE 9090 \leq GRADENUM 100\leq 100
GRADE == "A"
CASE 8080 \leq GRADENUM 90\leq 90 GRADE == "B"
CASE 7070 \leq GRADENUM 80\leq 80
GRADE = "C"
CASE 6060 \leq GRADENUM 70\leq 70
GRADE = "D"
CASE other
GRADE == "F""
ENDCASE
Write GRADE
Stop

A)80
B)90
C)less than 80
D)greater than 90
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck
16
Given the following pseudocode,how many conditions will be tested if 60 is input?
Start
Read GRADENUM
CASENTRY GRADENUM
CASE 60<60 < GRADENUM 80\leq 80
GRADE == "A'
CASE 5959 \leq GRADENUM <60< 60
GRADE == "B"
CASE 50<50 < GRADENUM 60\leq 60
GRADE == "C'
CASE other
GRADE = "No Grade"
ENDCASE
Write GRADE
Stop

A)1
B)2
C)3
D)4
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck
17
Given the following pseudocode,how many conditions will be tested if 70 is input?
Start
Read GRADENUM
CASENTRY GRADENUM
CASE 60<60 < GRADENUM 80\leq 80
GRADE == "A'
CASE 5959 \leq GRADENUM 70\leq 70
GRADE == "B'
CASE 50<50 < GRADENUM 60\leq 60
GRADE == "C'
CASE other
GRADE == "No Grade"
ENDCASE
Write GRADE
Stop

A)1
B)2
C)3
D)4
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck
18
We can replace the nested IFTHENELSE control structure with the CASE control structure.
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck
19
Given the following pseudocode,what value of GRADENUM can be input to output a grade of "F"?
Start
Read GRADENUM
CASENTRY GRADENUM
CASE 9090 \leq GRADENUM 100\leq 100 GRADE = "A"
CASE 8080 \leq GRADENUM 90\leq 90 GRADE = "B"
CASE 7070 \leq GRADENUM 80\leq 80 GRADE == "C"
CASE 6060 \leq GRADENUM 70\leq 70 GRADE = "D"
CASE other
GRADE == "F"
ENDCASE
Write GRADE
Stop

A)59
B)60
C)61 or less
D)none of the above
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck
20
In the following pseudocode,the value for WITHDRAWAL is an example of a(n)?
Start
RECEIPT = "Receipt"
ORDER = "Order"
WITHDRAWAL == "Withdrawal"
ADJUSTMENT = "Adjustment",
Read TRANSCODE
CASENTRY TRANSCODE
CASE RECEIPT
Process B000
CASE ORDER
Process B010
CASE WITHDRAWAL
Process B020
CASE ADJUSTMENT
Process B030
ENDCASE
Write GRADE
Stop

A)character string
B)character-string constant
C)alphabetic variable
D)both a and b
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck
21
The order in which tests are placed in a CASE control structure does not matter.
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck
22
A character string is set up once and never changes during program execution.
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck
23
The steps within each CASE path are always grouped together in a module.
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck
24
The top-to-bottom arrangement of the conditions in the CASE control structure dictates the actual order that the tests will be made by the computer.
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck
25
The pseudocode form of a CASE control structure always contains exactly three levels of indentation regardless of how many tests are made.
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck
26
An alphabetic value that is input during processing is called a character string.
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck
27
There should be the same number of steps in each CASE path.
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck
28
The CASE control structure is one of the three basic control structures.
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck
29
A master file contains data that is relatively permanent and not highly subject to change.
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck
30
A transaction file is also known as a detail file.
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck
locked card icon
Unlock Deck
Unlock for access to all 30 flashcards in this deck.