daily pastebin goal
42%
SHARE
TWEET

Untitled

a guest Apr 16th, 2018 45 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public class Student
  2.  
  3. {
  4.  
  5.   private int score;
  6.   private String name;
  7.  
  8.   public Student(String newName, int newScore)
  9.   {
  10.     name = newName;
  11.     score = newScore;
  12.   }
  13.  
  14.   public void addQuiz(int score)
  15.   {
  16.     quizCount++;
  17.     totalScore = score + score;
  18.     averageScore = (score + score) / 2;
  19.   }
  20.  
  21.   public String getName()
  22.   {
  23.     return name;
  24.   }
  25.  
  26.   public int getTotalScore()
  27.   {
  28.     return totalScore;
  29.   }
  30.  
  31.   public int getAverageScore()
  32.   {
  33.     return averageScore;
  34.   }
  35.  
  36.  
  37.  
  38. }
RAW Paste Data
Top