Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * Joel Siegel
- * 13 Sept 2011
- * Assignment #8 StudentTester program
- * A tester for the student program that computes total and average quiz score
- */
- public class StudentTester
- {
- public static void main(String[] args)
- {
- Student john = new Student();
- john.addQuiz(50);
- john.addQuiz(75);
- john.addQuiz(100);
- int total = john.getTotalScore();
- double average = john.getAverageScore();
- System.out.println(john.getName());
- System.out.println("Total Score: " + total);
- System.out.println("Expected Total Score: 225");
- System.out.println("Average: " + average);
- System.out.println("Expected Average: 75");
- }
- }
- /*
- * John
- Total Score: 225
- Expected Total Score: 225
- Average: 75.0
- Expected Average: 75
- */
Add Comment
Please, Sign In to add comment