14

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: e a subclass of Person called Student. • Students are people, except they have a student id, take courses and, of course, pay fees. CS133 Course Notes Lecture 14, Slide 12 11 12 The Student class public class Student extends Person Indicates this is a subclass of Person { private int studentID; private String courses = new String[6]; private int numCourses = 0; private static final double PER_COURSE_FEE = 256.74; public Student(String newName, int sID) Call the constructor { super(newName); of the super class this.studentID = sID; } public Student(String newName, String newAddress, int sID) Call the second { super(newName, newAddress); constructor of the super class this.studentID = sID; } CS133 Course Notes Lecture 14, Slide 13 The Student class continued public boolean equals(Student other) {...
View Full Document

This note was uploaded on 07/17/2010 for the course CS 133 taught by Professor Kierstead during the Fall '07 term at Waterloo.

Ask a homework question - tutors are online