email me at borlaj@portlandschools.org

Loading
notes previous (10/<10) submit the dump links  
 

Student Activity Day 3 HW

 

Start with the code from before (or use this),

 

Together, lets create these 2 methods:

  • public int[] lengthOfNames() that will return an array size 30 of the length of everyones first name.
  • public Student biggestDifference() that is going to return the student with the biggest difference between their regular average and their average without their lowest score.

 

On your own:

  1. public void printScoresOnTest(int testNum) that when called will print out "David Wells - 84" and so on for each student in the class.
  2. public double findClassAvg(int testNum) that will return the average of all students score on testNum (like test 0)
  3. public Student findHighestAverage() that will scan through and return the student with the highest average
  4. public int lowestScore() that will scan through all students and find the lowest score that any student has (maybe create a method in Student called public int lowestScore() that will return that students lowestScore
  5. public int[] findAllAverages() that will return an array of all the 30 averages in the class.

Extra people

  1. public Student[] findFailingStudents[] that will return as a array all the students who have failed 3 or more tests.
  2. public void addCurve (int testNum, int amount) that will add the amount to everyones testnum.
  3. public Student[] findBStudents() that will return as an array all the B students in the class