//The objects of the CollegeCourse class represent college courses, // each with 2 state fields: course-number and course-credits // //The following public methods are provided: // String number() - returns the course-number, e.g "COP2210" // int credits() - returns the course-credits, 3 or 4 // import java.util.Random; public enum CollegeCourse { //Predefined CollegeCourse instances BSC1010(4), CHM1032(3), COP2210(4), ENC1101(3), EVR1017(3), GLY1010(3), MAC2311(3), MAD2104(3), MUH2116(3), PHI2011(3), PHY2048(3), SYG2000(3); //Instance Variable private int credits; //# of credits for this CollegeCourse private CollegeCourse(int credits) { this.credits = credits; } //Returns the course-number of this CollegeCourse, "COP2210", etc. public String number() { return this.toString(); } //Returns the number of course-credits for this CollegeCourse public int credits() { return this.credits; } }