Design a nested program

Assignment Help C/C++ Programming
Reference no: EM13650

Consider the subsequent 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?"

Answer the following:

• What will be printed if the input is 0?
• What will be printed if the input is 100?
• What will be printed if the input is 51?
• What will be printed if the user enters Wingding?
• Is this design robust? If so, explain why. If not, explain what you can do to make it robust.
• How many levels of nesting are there in this design?
• Provide a set of values that will test the normal operation of this program segment. Defend your choices.
• Provide a set of test values that will cause each branch to be executed.
• Provide a set of test values that test the abnormal operation of this program segment.

Reference no: EM13650

Reviews

Write a Review

 

C/C++ Programming Questions & Answers

  Create program that uses functions and reference parameters

Create program that uses functions and reference parameters, and asks user for the outside temperature.

  Iimplement a client-server of the game

Iimplement a client-server version of the rock-paper-scissors-lizard-Spock game.

  Write a program using vectors and iterators

Write a program using vectors and iterators that allows a user to maintain a personal list of DVD titles

  Model-view-controller

Explain Model-View-Controller paradigm

  Write a webservices application

Write a webservices application that does a simple four function calculator

  Write the code required to analyse and display the data

Calculate and store the average for each row and column. Determine and store the values for the Average Map.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd