Course - String cDepartment) { title = cTitle; number =...

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

View Full Document Right Arrow Icon
//******************************************************************** // Course.java Author: Lewis/Loftus // // Represents a generic college course. //******************************************************************** / abstract public class Course { protected String title; protected String number; protected String description; protected String department; p //---------------------------------------------------------------- // Sets up a course with the specified information. //---------------------------------------------------------------- public Course (String cTitle, String cNumber, String cDescription,
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 cDepartment) { title = cTitle; number = cNumber; description = cDescription; department = cDepartment; } //-----------------------------------------------------------------// Returns a string including the basic course information. //-----------------------------------------------------------------public String toString() { String result = "Course Title: " + title + "\n"; S result += "Course Number: " + number + "\n"; result += "Course Description: " + description + "\n"; result += "Department: " + department; r return result; } }...
View Full Document

Ask a homework question - tutors are online