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

Student grades activity

 

Part 1:

Create a Student class that when constructed it will take in a students first and last name. Have it contain an array of 20 grades - blank originally. public Student(String fName, String lName)

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

Have a method that will findAvg public double findAvg()

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

 

4 point rubric - each method worth one point


/**
 * Write a description of class Students here.
 * 
 * @author (your name) 
 * @version (a version number or a date)
 */

public class Students
{
    String fName;
    String lName;
    //Below will initialize an array size 20 originally filled with all 0.
    int[] grades = new int[20];

    public Student(String fName, String lName)
    {
    }
   
    public void addGrade (int theGrade)
    {
    }
    
    public double findAvg()
    {
    }
    
    public int dropLowestAvg()
    {
    }
    
    
    
    
    
    
}

Part 2:

Look at this zip file