CS 1401 Introduction to Computer Science
Fall 2014, Lab 12

Motivation: to practice exceptions.

Assignment. Define a class Course. The description of each course should contain:

This class should contains: Make the constructor method throw an IllegalArgumentException exception if someone tries to input a negative number of students. Catch the exceptions thrown by this method and print appropriate error messages.

Write a method that ask the user for the number of courses and then forms an array of courses, by asking the user all this information about the course.

Write a second method that, given an array of courses, prints this information course by course.

When it is due. The program is due in the beginning of your last lab session: