Design and implement a java program that will gather


1. Design and implement a C# program that will gather floating point numbers and determine the sum and average of the data entered. The program should use separate methods for inputting the data, calculating the sum, calculating the average, and displaying the results.

A sentinel value should be used to indicate the user has completed entering their numbers.  The output should display a message that includes the count of the numbers entered, the sum of the numbers and the average of the numbers. If the sum of the numbers is greater than 100, a warning message should be displayed indicating "values have exceeded a sum 100".

2. Additional requirements include:

a. Be sure to comment your code.

b. Include a comprehensive set of application test data that you used to test your program. Your test data can be shown in a table that includes input data, expected output, actual output and pass/fail results from the test. 

Example application test data:

Input

Expected Output

Actual Output

Did Test Pass?

10.0
20.0
30.0

Sum = 60.0
Average = 20.0

Sum = 60.0
Average = 20.0

Y

Additional test cases here. Be sure to test all logic.

 

 

 

 

 

 

 

1. Design and implement a Java program that computes a speeding fine according to the speed limit, the actual speed, the speeding zone and the processing fee. The program should output the fine based on the user's input.

  • there are 3 different zones: highway, residential, and school
  • for highway, the fine is 5 times the amount of speed excess plus processing fee
  • for residential, the fine is 7 times the amount of speed excess plus processing fee
  • for school, the fine is 9 times the amount of speed excess plus 100 plus processing fee

2. Additional requirements include:

a. Use JOptionPane.showInputDialog() methods for your user to input their data

b. Use JOptionPane.showMessageDialog() methods to display your result.

c.  Include a comprehensive set of application test data that you used to test your program. Your test data can be shown in a table that includes input data, expected output, actual output and pass/fail results from the test.  Your test data can be presented in the form of a table as follows:

Example application test data:

Input

Expected Output

Actual Output

Did Test Pass?

speed limit: 75
actual speed: 88
zone: highway

fee: 100

165



Additional test cases here. Be sure to test all logic.

 

 

 

 

 

 

 

Solution Preview :

Prepared by a verified Expert
Programming Languages: Design and implement a java program that will gather
Reference No:- TGS01245457

Now Priced at $20 (50% Discount)

Recommended (95%)

Rated (4.7/5)