• Answer the following questions about the information in Appendix J:
o What will be printed if the input is 0?
o What will be printed if the input is 100?
“Your grade is 100” and “You did great”
o What will be printed if the input is 51?
“Your grade is 51” and “You did well”
o What will be printed if the user enters “Wingding”?
“How did you do?” – because Wingding is not a value between 0 and 100. o Is this design robust? If so, explain why. If not, explain what you can do to make it robust.
This design is pretty good, but could use a little bit more backbone. It doesn’t specify what the output will be if a non-numeric value is inputted – there should be an error output in the design. I also think that it should have an output value that would give the test score in a percentage form. o How many levels of nesting are there in this design?
There are three nested loops in this design.
o Provide a set of values that will test the normal operation of this program segment. Defend your choices.
86Your grade is 86 – You did great
69Your grade is 69 – You did OK
o Provide a set of test values that will cause each of the branches to be executed.
60Your grade is 60 – You did OK
80Your grade is 80 – You did well
90Your grade is 90 – You did great
500How did you do?
o Provide a set of test values that test the abnormal operation of this program segment.
HelloHow did you do?
120How did you do?
GuessHow did you do?
Anything other than a numeric value between 0 and 100 will return the same output.