Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * The Student class represents a student in a student administration system.
- * It holds the student details relevant in our context.
- *
- * @author Michael Kölling and David Barnes
- * @version 2016.02.29
- */
- public class Student
- {
- private int credits;
- /**
- * Create a new student with a given name and ID number.
- */
- public Student(String fullName, String studentID)
- {
- super(fullName, personId);
- credits = 0;
- }
- /**
- * Add some credit points to the student's accumulated credits.
- */
- public void addCredits(int additionalPoints)
- {
- credits += additionalPoints;
- }
- /**
- * Return the number of credit points this student has accumulated.
- */
- public int getCredits()
- {
- return credits;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement