it210_appendix_j - This is not robust by having the user...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Axia College Material Appendix J Algorithm Verification Consider the following selection statement where X is an integer test score between 0 and 100. input X if (0 <= X and X < 49) output "you fail" else if (50 <= X and X < 70) output "your grade is" X output "you did OK" else if (70 <= X and X < 85) output "your grade is" X output "you did well" else if (85 <= X and X < 100) output "your grade is" X output "you did great" endif output "how did you do?" What will be printed if the input is 0? “You fail” What will be printed if the input is 100? “How did you do?” What will be printed if the input is 51? “You did ok” What will be printed if the user enters “Wingding”? “Will terminate” Is this design robust? If so, explain why. If not, explain what you can do to make it robust.
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: This is not robust, by having the user input only numbers there is no chance for error. How many levels of nesting are there in this design? None Provide a set of values that will test the normal operation of this program segment. Defend your choices. 0-49, 50-69, 70-84, 85-100 Provide a set of test values that will cause each of the branches to be executed. IT 210 Input 5 to test the first segment, input 55 to test the second segment, input 80 to test the third segment, input 90 to test the final segment. Provide a set of test values that test the abnormal operation of this program segment. Input below zero can be -5 and for input above 100 can be 115 IT 210...
View Full Document

Page1 / 2

it210_appendix_j - This is not robust by having the user...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online