CS 1401,
Quiz 11, MW version
Date: Monday, November 17, 2014
Name (please type legibly, ideally in block letters):
______________________________________________________________________
Suppose that the class Course is already defined. The
description of each course contains:
- a class title,
-
the corresponding major, and
- the number of students taking
this course.
As usual, this class contains: - a
constructor method and
- get- and set-methods.
Write a method that, given an array of courses, returns the title
of the course that has the largest number of students.
Trace your method on the example of an array of two courses:
- a course titled "Intro to CS", major CS, number of students
120; and
- a course titled "Discrete Math", major Math, number
of students 85.