Title: Assignment 4
Course: COP 1510 Programming Concepts > Section: Module 5 - Input Validation

For your module 5 assignment, you will design and write a program following the specification that is given below. Design your program using a flowchart and pseudocode. Submit your final flowchart and pseudocode design in the dropbox.

Speeding Violation Calculator

Design a program that calculates and displays the number of miles per hour over the speed limit that a speeding driver was doing. The program should ask for the speed limit and the driver’s speed. Validate the input as follows:
- The speed limit should be at least 20, but not greater than 70
- The driver’s speed should be at least the value entered for the speed limit (otherwise the driver was not speeding).

Once correct data has been entered, the program should calculate and display the number of miles per hour over the speed limit that the driver was doing.

Example Output:

What is the speed limit?
80 [Enter]
Invalid Entry, the speed limit must be between 20 and 70. What is the speed limit?
65 [Enter]
How fast was the driver going?
50 [Enter]
Invalid Entry, the speed must be greater than the speed limit. How fast was the driver going?
85 [Enter]
This driver was going 20 miles per hour over the speed limit. Book ‘em Danno!