email me at borlaj@portlandschools.org
notes previous (09/07/06) submit the dump links  
 

Student grades activity

 

We are going to create a program that will keep track of students grades. Use this starter code.

Part 1:

Create a Student class that has globalsfirstName, lastName, numOfTests and grades (an array of 20 grades - blank originally. )

 

When constructed it will take in a students first and last name. public Student(String fName, String lName)

Have a method - addGrade that will add a grade to that array. public void addGrade (int testScore)

Have a method that will findAvg public double findAvg()

Have a method that will find the average with the lowest grade not counted. public double dropLowestAvg()

Have a method public void printStudent() that will print out their first name last name the number of tests they have taken, their avg and their avg without the lowest grade

 

 

 

Part 2:

 

 

Create these methods below:

public void printEveryStudents() that will print out each students info (their name, tests and avg).

 

 

public double findClassAverage() that will find the average of the averages

 

public int maxTest () that will return the maximum number of tests that any student has taken.

 

public int numOfBStudents() that will return how many students have an B for a fixed average (from 85<=x<93))

 

 

 

Not hw

public Student[] findAStudents() that will return an array of all the students that have 93+ average.

public Student findHighestAverage() that will scan through and return the student with the highest average