I am having some trouble with an assignment I have. Is there anyone out there that can help me? I have been struggling with the class all semester and my professor isn't much help.
This is the assignment, I already have data file:
Instead of storing the diver data in arrays, create a Diver java class per the following Diver uml diagram:
firstName String
lastName String
scores Vector
// Code appropriate Constructors
public Diver()
// Code appropriate getter
// and setter methods
public String getFirstName()
public void setFirstName(String str)
// Code the toString method
public String toString()
Much like the StudentData and TestProgStudentData classes reviewed in class today, you will need to write a TestDiverData class. This class will read the provided data file, create instances of Diver objects and populate them with the data as it's read from the data file. The TestDiverData class will store the created Diver objects in a Vector of it's own.
Once all the data has been read and the Vector of Diver objects has been populated perform the same processing as required for Assignment 10. For each Diver output the diver's name and total score using the provided scoring rules. Each contestant's score is calculated by dropping the lowest and highest scores and then adding the remaining scores. Format each diver's total score to two decimal places. So for example, the output for Chen Ruolin below would be: Chen Ruolin – 56.90 points.
Chen Ruolin 9.2 9.3 9 9.9 9.5 9.5 9.6 9.8
Emilie Heymans 9.2 9.2 9 9.9 9.5 9.5 9.7 9.6
Wang Xin 9.2 9.2 9.1 9.9 9.5 9.6 9.4 9.8
Paola Espinosa 9.2 9.3 9.2 9 9.5 9.3 9.6 9.8
Tatiana Ortiz 9.2 9.3 9 9.4 9.1 9.5 9.6 9.8
Melissa Wu 9.2 9.3 9.3 9.7 9.2 9.2 9.6 9.8
Marie-Eve Marleau 9.2 9.2 9.2 9.9 9.5 9.2 9.3 9.8
Tonia Couch 9.2 9 9.1 9.5 9.2 9.3 9.4 9.6
Laura Wilkinson 9.7 9.1 9.3 9.4 9.5 9.4 9.6 9.2
Your program must read the data in from the provided data file and use arrays to store that data. Once all the data has been read in the program needs to calculate each diver's total points and output that diver's name and total points. Where total points is calculated based on the scoring rule defined above.