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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!