Project #4716 - Logic and Design

What is the first step in software development?
      
Develop the logical solution
      
Understand the problem
      
Plan/design the logic
      
Translate the code

 

2. What are named locations in a computer’s memory holding information required by a program?
      
Data
      
Variable
      
IPO Model
      
Flowchart

 

3. What symbol in a flowchart would be used by a developer to represent the beginning or ending point?
      
Parallelogram
      
Diamond
      
Rectangle
      
Lozenge

 

4. ) Set name = “BSCIS” is a process. What data type would you expect the variable, name, to have?
      
Integer
      
Real
      
String
      
Any of the above

 

5. (You are using dollar amounts in an algorithm. What data type would you assign? (
      
Integer
      
Real
      
String
      
Any of the above

 

6. What tool is used by developers to design logic using specific shapes/symbols?
      
Desk checking
      
Flowcharts
      
Pseudocode
      
Hierarchy charts

 

7. When a program evaluates mathematical expression, which of the following operators (or mathematical operations) takes precedence? (
      
Division
      
Multiplication
      
MOD
      
All of the above because all have equal precedence

 

8. (Which one of the following is a valid assignment statement in a program? (
      
total = total + 1
      
counter = counter + 10
      
tax = amount * .10
      
All are valid assignment statements.
 

 

9. (Evaluate (2 * 3) ^ 3.
      
18
      
36
      
216
      
81

 

10. (TCO 2) Review the partial pseudocode below. What is the correct math expression to complete the algorithm and total sales for both regions?
                                Prompt “Enter total sales for region 1: “
                                Input region1
                                Prompt “Enter total sales for region 2: “
                                Input region2
                                 Set _____
                                Display “total sales:  “ + total
(Points : 4)
      
total = region2
      
total = region1 * region2
      
total = region1 + region2
      
total = region1
 

 

11. (TCO 3 & 4) Review the pseudocode below. What will be displayed when this algorithm executes?
                                Set x = 20
                                If ((x > = 10) AND (x < 20)) then
                                                Display “the IF path executes”
                                Else
                                                Display “the ELSE path executes”
                                EndIf
(Points : 4)
      
the IF path executes
      
the ELSE path executes
      
20
      
(x >= 10) AND (x < 20)

 

12. (TCO 3 & 4) What value gets displayed for the variable X?
                                Set A = 5
                                Set B = 10
                                Set C = 15
                                If (B > 15) AND ((A = 5) OR (C <= 15)) then
                                                Set X = 1
                                Else
                                                Set X = 0
                                EndIf
                                Display X
(Points : 4)
      
5
      
1
      
10
      
0

 

13. (TCO 3 & 4) In the following pseudocode, what raise will an employee in Department 6 receive?
                                If department < 2 then
                                                Set raise = 1000
                                Else
                                                If department < 6 then
                                                                Set raise = 2500
                                                Else
                                                                Set raise = 3000
                                                EndIf
                                EndIf
(Points : 4)
      
1,000
      
2,500
      
3,000
      
0
 

 

14. (TCO 3 & 4) Which of the selection structures determine whether the user enters a number outside a range of 5 and 15? (Points : 4)
      
If commission <> 15
      
If commission <= 15
      
If (commission >= 5) OR (commission <=15)
      
If (commission >=5) AND (commission <= 15)

 

15. (TCO 3 & 4) What value gets displayed for the variable Z?
                                Set balance = 800
                                Set stateCode = 6
                                Set creditCode = 7
                                If ((balance <> 800) OR (stateCode <> 6) OR (creditCode <> 7) then
                                                Set Z = 3
                                Else
                                                Set Z = 2
                                EndIf
                                Display Z
(Points : 4)
      
3
      
2
      
6
      
7

1. (TCO 5) The statements executed within a loop are known collectively as the _____. (Points : 4)
      
loop controls
      
exit condition
      
entry condition
      
loop body

 

2. (TCO 5) Which of the following statements is false? (Points : 4)
      
A DO loop is a post-test loop
      
A REPEAT..UNTIL loop is a post-test loop
      
A DOWHILE loop is a pre-test loop
      
All of the above statements are true

 

3. (TCO 5) A DO loop is considered what type of loop? (Points : 4)
      
A counted loop
      
A post-test loop
      
A sequence structure
      
A selection structure

 

4. (TCO 5) What happens when the loop control variable is not changed? (Points : 4)
      
A counter is displayed.
      
The program will automatically stop the loop.
      
The program will immediately terminate.
      
An infinite loop occurs.

 

5. (TCO 5) How many times will the following loop be executed? 
                                Set num = 0
                                DOWHILE num <= 6
                                                Display num
                                                Set num = num + 1
                                ENDO
(Points : 4)
      
Zero times
      
One time
      
Six times
      
Seven  times
 

 

6. (TCO 7) What is another name for an array’s index? (Points : 4)
      
An element
      
An array
      
A subscript
      
An index
 

 

7. (TCO 7) Suppose you have an array named number,
and two of its elements are number(1) and number(4). You know that _____.
(Points : 4)
      
the two elements hold the same value
      
the two elements are at the same memory location
      
the array holds exactly four elements
      
there are exactly two elements between number(1) and number(4)
 

 

8. (TCO 7) Which one of the following correctly declares a zero-based array of four integers? (Points : 4)
      
Declare Integer numArray(3)
      
Declare Integer numArray(4)
      
Declare Real numArray(3)
      
Declare Real numArray(4)

 

9. (TCO 7) When processing the elements of an array, what control structure is used to move through each element within the array? (Points : 4)
      
Sequence control structure
      
Selection control structure
      
Repetition control structure
      
Data structure

 

10. (TCO 7) A zero-based array named sales has been declared and loaded with the values  100, 1100, 3400, 5550, 3000, 22300, and 1200. What value will be stored in the array element sales(1)? (Points : 4)
      
1100
      
3400
      
5550
      
100

 

11. (TCO 6) A file contains _____. (Points : 4)
      
a collection of records
      
a collection of only strings
      
a collection of only integers
      
a collection of Boolean variables

 

12. (TCO 6) What is automatically placed at the bottom of a file when the file is closed? (Points : 4)
      
End-of-file marker
      
The file pointer
      
The file-position indicator
      
The out-of-bounds indicator

 

13. (TCO 8) Menu-driven programs need to give the user the option to _____. (Points : 4)
      
view data
      
enter data
      
exit/quit the menu
      
All of the above

 

14. (TCO 9) What type of error occurs when a program will not execute because the rules of the language have been violated? (Points : 4)
      
Syntax error
      
Runtime error
      
Logic error
      
Out-of-bounds error

 

15. (TCO 2) The first module is usually considered to be called the _____ module. (Points : 4)
      
hierarchy
      
top
      
boss
      
main

 

1. (TCO 10) A retail store is having a customer appreciation sale. Depending on the total dollars purchased, the customer could receive a discount on his or her total purchases. You are to develop pseudocode that will obtain the total dollars purchased from the user, determine the discount percentage, and display the total amount due. When the purchases are more than $100, the discount is 10%. When the purchases are $100 or less, the discount is 5%. (Points : 10)

      

Subject Computer
Due By (Pacific Time) 04/21/2013 06:27 pm
Report DMCA
TutorRating
pallavi

Chat Now!

out of 1971 reviews
More..
amosmm

Chat Now!

out of 766 reviews
More..
PhyzKyd

Chat Now!

out of 1164 reviews
More..
rajdeep77

Chat Now!

out of 721 reviews
More..
sctys

Chat Now!

out of 1600 reviews
More..
sharadgreen

Chat Now!

out of 770 reviews
More..
topnotcher

Chat Now!

out of 766 reviews
More..
XXXIAO

Chat Now!

out of 680 reviews
More..
All Rights Reserved. Copyright by AceMyHW.com - Copyright Policy