|
|

This is only a preview of the paper Click here to register and get the full text. Existing members click here to login
|
|
|
...
Specification
Inputs
menu choice
required topping
two weights
Outputs
Text Message “Please enter a selection” and put cursor on new line
Text Message “Input T to choose a topping, L to enter weight or Q to quit” and put cursor on a new line
Text Message “Thank you for using this program”
Text Message “Please Enter either T, L, or Q:” and put cursor on a new line
Text Message “Please enter a selection” and put cursor on a new line
Text message “Enter 5 for bacon, 6 for mushroom, 7 for onion, 8 for salami or 9 for peppers” and put cursor on a new line
Text Message “bacon” and put cursor on a new line
Text Message “mushroom” and put cursor on a new line
Text Message “onions” and put cursor on a new line
Text Message “salami” and put cursor on a new line
Text Message “peppers” and put cursor on a new line
Text Message “You have entered an incorrect number, please try again” and put cursor on a new line
Text Message “Please enter 2 weights, the greater value will be displayed on screen” and put cursor on a new line
Text Message “Please enter the first weight” and put cursor on a new line
Text Message “Please enter the second weight” and put cursor on a new line
Text Message “The greatest weight is: “
Value stored in Weight 1 and put cursor on a new line
Text Message “The greatest weight is: “
Value stored in Weight 2 and put cursor on a new line
Text Message “The two weights are equal: ”
Value stored in Weight 1
Processing
getLetter switch option T or t: call function getTopping
L or l: call function getWeight
Q or q: display goodbye message
quit program
getTopping Switch option 5: display output for 5
break out of switch
6: display output for 6
break out of switch
7: display output for 7
break out of switch
8: display output for 8
break out of switch
9 display output for 9
break out of switch
Default display default message
call function getTopping
getWeight if Weight1>Weight 2
display Weight1
else if Weight1 display Weight2
else if Weight1=Weight2
display Weight1
Data Table
Identifier Type Description
getweight float weights entered by user
getLetter char menu choice
getTopping int topping selection
Test Data
getLetter getTopping Weight1 Weight2 Justification Expected Result
j Invalid Character Error message requesting re-input
L Valid character Call function getWeight
1 Invalid Integer Error message requesting re-input
5 Valid Integer Display: bacon
34 28.
Approximate Word count = 1053 Approximate Pages = 4.2 (250 words per page double spaced)
|
|
|
|
|
|