Guest User

Untitled

a guest
Nov 24th, 2017
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.84 KB | None | 0 0
  1.  
  2. /*
  3. * Joel Siegel
  4. * 13 Sept 2011
  5. * Assignment #8 StudentTester program
  6. * A tester for the student program that computes total and average quiz score
  7. */
  8. public class StudentTester
  9. {
  10. public static void main(String[] args)
  11. {
  12. Student john = new Student();
  13.  
  14. john.addQuiz(50);
  15. john.addQuiz(75);
  16. john.addQuiz(100);
  17.  
  18. int total = john.getTotalScore();
  19. double average = john.getAverageScore();
  20. System.out.println(john.getName());
  21. System.out.println("Total Score: " + total);
  22. System.out.println("Expected Total Score: 225");
  23. System.out.println("Average: " + average);
  24. System.out.println("Expected Average: 75");
  25.  
  26. }
  27. }
  28. /*
  29. * John
  30. Total Score: 225
  31. Expected Total Score: 225
  32. Average: 75.0
  33. Expected Average: 75
  34. */
Add Comment
Please, Sign In to add comment