Post date: Apr 08, 2015 5:2:18 AM
Defining Classes 1
4.1 Class Definitions
Recommended Self-Test Exercises:
p 218: Ex. 3.
p 220: Ex. 4.
p 228: Ex. 5-9.
In-class Exercises:
Implement the following class:
Implement a NewStudent class with the following fields and methods:
Fields:
String name
double totalScore
int numberOfQuizzes
Methods:
public String getName()
public double getAverage() //this should return zero if no quiz has been taken.
public double getTotalScore()
public void printStudent() //this should print the student’s name and average score