Question: Course Assignment Program 7 This assignment will be started in class but completed as a homework assignment Write a class XXX Course, (XXX is your

Course Assignment Program 7 This assignment will be started in class butCourse Assignment Program 7

This assignment will be started in class but completed as a homework assignment Write a class XXX Course, (XXX is your Kean Id) (12.5 points total) A course has a department code (e.g., CPS or MATH), a course number, and a room number. (1.5 points) Include a static variable used to assign the course number to each Course in the constructor. The value of the variable will start at 2000. (1 point) Write the accessors (getters), the mutators (setters) and two constructors for the class. One of the constructors should be the no-args constructor. o o o Accessors (getters) (2 points) Mutators (setters) (2 points) .Constructors (4 points) o Also write a toString) method that returns all of the instance variables strung together appropriately (e.g., "Dept: CPS; CourseNumber: 2000; Room 208") (2 points) Write a second class, XXX CourseTester (XXX is your Kean Id) ,which will have a main method. (12.5 points total) Create an Array of Course objects that can hold 3 elements. (1.5 points) Using a loop: (7 points) o o Ask the user for the department and room number for 3 courses TIP: Use next() instead of nextLine) Create course objects Store the objects in the Array - At the end, traverse the array of courses and print each course on a separate line. (4 points) o Sample output Enter Dept CPS Enter room number 208 Enter Dept CPS Enter room number 220 Enter Dept CPS Enter room number 204 Printing the courses Dept: CPS; CourseNumber: 2000; Room 208 Dept: CPS; CourseNumber: 2001; Room 220 Dept: CPS; CourseNumber: 2002; Room 204

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!