Question: The program starts with the role selection screen. The user makes the role selection ( student , admin ) . 1 ) Student - After

The program starts with the role selection screen. The user makes the role selection (student, admin).1) Student - After the welcome message, the menu appropriate to the student is displayed. Student makes a selection from the menu; 1. Shows all courses. You can use the list below: 2. Student adds the number of courses he/she chooses to the course card. If he/she wants, he/she can cancel the adding process by saying cancel. 3. Student displays the course card. 4. Student can remove a course from the course card. 5. Student saves the course card. 6. Exits and returns to the role selection screen. 2) Admin - After the welcome message, the menu appropriate to the admin is displayed. Admin makes a selection from the menu; List allCourses = new ArrayList<>(Arrays.asList( new Course("CMPE113", "Computer Programming I", 4, "open"), new Course("CMPE109", "Fundamentals of Computing", 2.5, "closed"), new Course("CMPE134", "Fundamentals of Electronic Components", 3.5, "open"), new Course("CMPE114", "Computer Programming II",5, "open"), new Course("CMPE251", "Discrete Computational Structures", 7, "closed"), new Course("CMPE225", "Object-Oriented Programming", 8, "open"), new Course("CMPE226", "Data Structures", 8, "closed"), new Course("CMPE236", "Introduction to Microprocessors and Microcontrollers", 8, "open"), new Course("CMPE323", "Algorithms", 7, "closed"), new Course("CMPE331", "Computer Architecture and Organization", 7, "open"), new Course("CMPE325", "Study of Programming Languages", 6, "closed"), new Course("CMPE399", "Summer Practice I", 6, "open"), new Course("CMPE341", "Database Design and Management", 7, "closed"), new Course("CMPE334", "Computer Networks", 6, "open"), new Course("CMPE326", "Formal Languages and Automata", 6, "closed"))); 1. Admin can add a new course to courses (by adding course id, course name, credits, status).2. Admin can delete a course. 3. Exits and returns to the role selection screen. Restrictions: -Students should receive the appropriate message when selecting a course that is not on the list or a closed course. -Students can take a maximum of 30 credits. They should receive the appropriate message when adding a course that exceeds this number. -Students should receive the appropriate message when trying to remove a course that is not on the list or not in the course cart. - After submitting the course cart, they should receive the appropriate message when they try to add or remove a course. -Admins should receive the appropriate message when trying to add a course that is already on the list. -Admins should receive the appropriate message when trying to remove a course that is not on the list. -Students or admins should receive the appropriate message when entering an unavailable number in all menus. Use inheritance to create student and admin from users. Use abstract classes or interfaces for showing the entry menu. Use method overriding for customized actions. Handle errors caused by restrictions using exception handling. Implement generics for managing collections of courses or lesson carts. The LessonCart class accepts only objects of type Course.

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 Programming Questions!