$29
Things you will learn in doing this project:
Designing a program
Using loops
Using if statements
Using Command-line arguments
Write an application named MyNumbers5 that accepts a variable set of integers as Command-line arguments. The program should compute (1) sum, (2) average, (3) smallest, and (4) the two largest values (first largest (top) and second largest). Your program should accept any set of integer values as command-line arguments, displays a report header (see sample output), input data, and computed values.
The program should display an error message if the number of command-line arguments is less than two.
Use if statements and a loop to compare and process the integer values. The values could be any set of negative, zero, and positive integers.
Append to your report the following fill in self-evaluation:
Have you documented program and methods: _____?
Have you indented all class variables and methods: ________?
Have you indented all statements inside methods: ________?
Have you used good variable names: _______?
Is your program well structured, aligned, indented, and easy to read: _____?
Does your class MyNumbers5 compile without syntax errors: ___________?
Does your driver program run without runtime errors: ___________?
Does your program run without logical errors: ___________?
Does your program satisfy all the requirements: ___________?
Is your code efficient: ___________?
Zip all your files into single one. Name it with your last name followed by the program#. For example, Fares5.
Attach the zipped file
Sample output
******************* MyNumbers5 ****************************
Name: John Smith
Course: CS1301 A or B
Date: 9/18/2015
***********************************************************
Empty set
******************* Have a good day ***********************
******************* MyNumbers5 ****************************
Name: John Smith
Course: CS1301 A or B
Date: 9/18/2015
***********************************************************
not enough arguments
******************* Have a good day ***********************
******************* MyNumbers5 ****************************
Name: John Smith
Course: CS1301 A or B
Date: 9/18/2015
***********************************************************
Values: 12 5
Total is 17
Average is 8.50
Smallest value is 5
First largest value is 12
Second largest value is 5
******************* Have a good day ***********************
******************* MyNumbers5 ****************************
Name: John Smith
Course: CS1301 A or B
Date: 9/18/2015
***********************************************************
Values: 12 5 55 4 66 22
Total is 164
Average is 27.33
Smallest value is 4
First largest value is 66
Second largest value is 55
******************* Have a good day ***********************