Matrices of Objects
Name _____________________________________
Given :
public interface Person
{public String getName();
public String getGender();
public double getAverage();
}
_________________________________________________
private Person [][] ma;
1. Write a method that will print out the names of all the boys who have an average under 65.
public void printBoys()
2. Write a method that will return the girl with the highest average
public String getHighestGirl()
3. Write a method that will return the average for a particular row
public double getRowAverage(int r)
4. Write a method that will return the row that has the highest average. You must call the method written in #3 to get full credit.
public int getHighestRow()
5. Write a method that will return the sum of the numbers in a particular column.
public double getSum(int n)