I need help designing a Java class. The task is to set up a class that determines
Question:
I need help designing a Java class. The task is to set up a class that determines how each student would be picked based on the sport. The students will be labeled based on there intelligence, strength, and speed.
Each student is represented by four input items: a student's name followed by the student's strength, speed, and intelligence (in this order). Ensure that no two students will ever have all 3 qualities the same with proper input validation. Some qualities may be shared, but not all three. Ensure that names will always consist of only letters, and scores will always be input as numbers only. Scores can range from a high of 100 down to a low of -10, this validation also needs to be built into your program. The number of students entered will vary, but we will always have at least 1.
When picking teams for the rope climb, students first consider strength, followed by speed, and then intelligence. When picking teams for freeze tag, students first take into account speed, then intelligence, and then strength. When picking teams for programming, students first take into account intelligence, then speed, and then strength. The program needs to accept student names and attributes as input and display the order in which the students are chosen for each sport. I have attached what I have for the class so far.
public class PhysEd { public int index = 0; public boolean validInput;
// Declaring students array String[][] studentData;
/** * Initialize the students array * * @param number - number of students */
public PhysEd(int number) { studentData = new String[number][4]; }
/**
//************************************************************ validateInput >>>>>>>> * Validates Input from Driver Class * * @param s - The input string */ public void validateInput(String s) {
} //************************************************************ <<<<<<<<
//************************************************************ printStudents >>>>> /** * Print the list of students */ public void printStudents() {
} //************************************************************ <<<<<<<
//************************************************************ sortByAttributes >>>>> /** * Sort the rows of students in descending order based off attributes * * @param first - The first attribute to sort by * @param second - The second attribute to sort by * @param third -The third attribute to sort by */ public void sortByAttributes(int first, int second, int third) {
}
}
Business Statistics A Decision Making Approach
ISBN: 9780133021844
9th Edition
Authors: David F. Groebner, Patrick W. Shannon, Phillip C. Fry