Bifalgorithm post · Computer science one · Computing Quadratic Roots

What kinds of user input can cause problems in a quadratic-roots program?

What kinds of user input can cause problems in a quadratic-roots program? (Computer science one · Computing Quadratic Roots) — "Finally, think about the possib…

Ideas in this flowchart

  • Robustly handling problematic user input
  • Potential bad inputs must be identified
  • The user enters zero for a
  • The user enters values such that b² < 4ac
  • The user enters non-numeric values
  • How many command-line arguments were provided?
  • Fewer than three command-line arguments were provided
  • More than three command-line arguments were provided
  • Prevent the consequences of bad input
  • Handle the event that bad input is entered
  • Communicate input errors to the user
  • Use conditionals to resolve these issues
Feed/

What kinds of user input can cause problems in a quadratic-roots program?

No cover

Channel

Computer science one

1 page

"Finally, think about the possible input a user could provide that may cause problems for this program. For example:\n\n• What if the user entered zero for a?\n\n• What if the user entered some combination such that b^2 < 4ac?\n\n• What if the user entered non-numeric values?\n\n• For the command line argument version, what if the user provided less than three arguments? Or more?\n\nHow might we prevent the consequences of such bad input? How might we handle the event that a user enters bad input and how do we communicate these errors to the user? To begin to resolve these issues, we’ll need conditionals."

Flowchart preview
👍
0
0 comments0 shares

Sign in to view and post comments.