Question: Java The enrollment manager has a list of the class of each student at the college stored as a character, either 'U' for upper class
Java
The enrollment manager has a list of the class of each student at the college stored as a character, either 'U' for upper class (junior or senior) or 'L' for lower class (freshmen or sophomore). Write the following method to determine what proportion of students at the college are upper class students. For example, if there were 100 students total and 15 were upper class, the proportion of upper class students at the college would be 0.15.
This ratio will be used for funding purposes, so it is very important not to underestimate the proportion of upper class students!
/**determines what proportion of the students are
* upper class. Upper class is indicated by 'U'.
* @param student the array of students where 'U' * is for upper class and 'L' is for lower class.
* @returns the ratio of upper class students to
* the total number of students.
*/
public double getProportionUpper(char[] student) {
//fill in code here
}
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
