ScoreTester1.java.html

  1  import java.util.Scanner;
  2  
  3  public class ScoreTester1
  4  {
  5     public static void main(String[] args)
  6     {
  7        Scanner in = new Scanner(System.in);
  8        Student fred = new Student(100);
  9        fred.addScore(10);
 10        fred.addScore(20);
 11        fred.addScore(5);
 12        System.out.println("Final score: " + fred.finalScore());
 13        System.out.println("Expected: 30");
 14     }
 15  }