Create a JAVA program will consist of two files
App.java - the main application class
Unique.java - class for retrieving the unique values from the user
Include documentation at the top of both files that includes
Your name
Date of development
Assignment (e.g. CIS218 Final Practical
Description of the class
The Unique class provides the following:
Constructor
Private member variable to store 5 unique values (hint: use an Array or an ArrayList)
Public function to get 5 unique values from the user and store them in the member variable
loop to get the numbers, if a number is already stored, ignore it and keep looping until you have 5 unique numbers
if a number is out of range, don't store the value, throw an exception and handle it in such a way that you don't break the loop but do message the user that the value was out of range
Public functions to return the following based on the stored values:
Largest number
Smallest number
Sum of all numbers
Average of the numbers entered
Last number entered divided by the first number entered
Hint: How you approach the ability to get the above values is up to you - you may process the stored values within each function, you may use private member variables to store the information as you retrieve it from the user, or you may use a combination of both techniques
The main application does the following
Print a line that states "Your Name - Final Practical"
Creates an instance of the Unique class
Calls the Unique class's getNumbers function to get the necessary values from the user
Calls the Unique class's function to print the following (each value with an appropriate label)
All unique values entered by the user
The largest number entered
The smallest number entered
The sum of all numbers entered
The average of all numbers entered
The last number entered divided by the first number entered (handle division by 0 exception properly)
Sample Output: