Create a class that acts as a blueprint for a College Course.
·
This class should have the following state:
o
int – course reference number
o
int - course number
·
This class should have the following behaviour:
o
Appropriate setters and getters
·
This class should have the following constructors:
o
Default constructor
o
Constructor that takes two arguments.
Create a second class called CollegeCourseTestHarness:
o
Create a two dimensional array with 10 columns and 200 rows.
o
Fill the first 100 rows with CollegeCourse Objects in which the course reference number and course number are set to the default value of zero.
o
Fill the second 100 rows with CollegeCourse Objects in which the course reference number and course number are set to the default value of 9999.
o
Iterate the array and print out the state of each object with an appropriate short label. Print a dashed line between each data set.
o
Iterate the array a second time with separate for loops, and set the state of each object as follows:
o
Set the course reference number to a sequential/unique 7 digit value
o
Set the course number to one of four, 5 digit course numbers that are randomly chosen from a list you make up.
o
Iterate the array a third time with a separate for loops and print out the state of each object with an appropriate short label. Print a dashed line between each data set.
Ask the user for a column and row number. Print out the state of the object corresponding to this location. Take into account the probability that the user will provide a value that is out of the bounds of the array, which will throw an exception. Handle this exception in your code using a try/catch block to ensure your program will not crash but instead will inform the user that they need to provide a valid set of numbers