MajorCourse - String cDescription, String cDepartment,...

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

View Full Document Right Arrow Icon
//******************************************************************** // MajorCourse.java Author: Lewis/Loftus // // Represents a generic course within a specific major. //******************************************************************** / public class MajorCourse extends Course { protected String major; protected String requisite; p //---------------------------------------------------------------- // Sets up a major course with the specified information. //---------------------------------------------------------------- public MajorCourse (String cTitle, String cNumber,
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: String cDescription, String cDepartment, String cMajor, String cRequisite) { super (cTitle, cNumber, cDescription, cDepartment); s major = cMajor; requisite = cRequisite; } //----------------------------------------------------------------// Returns information about this course as a string. //----------------------------------------------------------------public String toString() { String result = super.toString(); S result += "\nCourse Major: " + major + "\n"; result += "Pre/Co-Requisite(s): " + requisite; r return result; } }...
View Full Document

Ask a homework question - tutors are online