Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The assignment must be completed by individual efforts. University guidelines will be followed to deal with issues related to academic integrity. Write a C# program

image text in transcribed

The assignment must be completed by individual efforts. University guidelines will be followed to deal with issues related to academic integrity. Write a C# program to calculate the speeding fines for cars on a highway. After detecting the speed of a car (kilometres per hour) on a speed-gun, a police officer will enter the speed (integer) as an input to your program. The office will also enter the speed limit (integer) on that highway. Your program will calculate the total fine (floating point) based on the following hypothetical regulations: Table 1: Speeding fine regulations Before calculating the total fines, your program will check the validity of the speed and the limit so that the entered values are within a reasonable boundary. You can make your own definition of 'reasonable'. For example, a car running on the highway cannot have a speed of 10,000km/ hour. Similarly, the none of highways realistically has a limit of just 10km/ hour. Again, these are just examples. Use your own validity checks. Do NOT use Switch statements in your program. On the output screen, your program will either show the calculated total fines or show a message indicating invalid input. Your program must show appropriate prompts to take input form the police offer. Proper output message needs to be written on the console while showing the output. Include enough comments in the program to explain your code

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Advances In Knowledge Discovery In Databases

Authors: Animesh Adhikari, Jhimli Adhikari

1st Edition

3319132121, 9783319132129

More Books

Students also viewed these Databases questions

Question

What are the different techniques used in decision making?

Answered: 1 week ago