class Course {
	private String courseTitle;
	private String meetingRoom;
	private String meetingTimes;
	private Professor instructor1;
	private Professor instructor2;
	//variable is set to true if course is taught by two professors
	private boolean twoInstructors;

	//constructor for a course taught by one professor
	public Course(String title, String room, String times, Professor instructor1) {
		courseTitle = title;
		meetingRoom = room;
		meetingTimes = times;
		this.instructor1 = instructor1;
		twoInstructors = false;
	}

	//constructor for a course taught by two professors
	public Course(String title, String room, String times, Professor instructor1, Professor instructor2) {
		courseTitle = title;
		meetingRoom = room;
		meetingTimes = times;
		this.instructor1 = instructor1;
		this.instructor2 = instructor2;
		twoInstructors = true;
	}


	//Prints information for a course object.
	//Uses the printProfessorInfo method to print the information
	//for the professor(s) teaching the course.
	public void printCourseInfo() {
		System.out.println(courseTitle);
		System.out.println(meetingRoom);
		System.out.println(meetingTimes);
		instructor1.printProfessorInfo();
		//Necessory if course is being taught by two professors
		if (twoInstructors) {
			instructor2.printProfessorInfo();
		}
		System.out.println("");

	}
}

