public class Student {
  // instance fields
  // A student has a name, 
  // number of quizzes taken,
  // and a total quiz score.
  private String myName;
  private int myNumTests;
  private double myTotal;
  
  // constructor
  public Student(String name) {
    myName = name;
    myNumTests = 0;
    myTotal = 0;
  }
  
  // methods
  public String getName() {
    return myName;
  }
    
  public double getTotal() {
    return myTotal;
  }
  
  public int getNumTests() {
    return myNumTests;
  }
  
  public void addQuiz(double score) {
    myNumTests += 1;
    myTotal += score;
  }
   
  public double getAverageScore() {
    double avg = myTotal / myNumTests;
    return avg;
  }
   
  public String toString() {
    return "A student with name " + getName() +
      " with number of tests " + getNumTests() +
      " with total score " + getTotal() +
      " and with average " + getAverageScore();
  }
}