Studentid thissamenameother thissameaddressother

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: return this.studentID == other.studentID && this.sameName(other) && this.sameAddress(other); } public String getStudentID() { return this.studentID; } public double calcFees() { return this.numCourses*PER_COURSE_FEE; } CS133 Course Notes Lecture 14, Slide 14 13 14 Student class continued super(Arguments) • Calls the constructor of the immediate superclass if there is one that can accept the arguments. • Must be first statement in constructor • Otherwise, super() is inserted automatically • Otherwise, there is a compile-time error. • Here, Person's constructors are called. CS133 Course Notes Lecture 14, Slide 15 CS133 Course Notes Lecture 14, Slide 16 15 16 Student class continued • A Student object will have a name, as well as the getName and setName metho...
View Full Document

Ask a homework question - tutors are online