Question: In JAVA Exercise 2 [Minor.java] A Student can have zero or more minors (maximum of 3 minors). A minor has a Minor_Name, a Minor_Department. a.
In JAVA
Exercise 2 [Minor.java]
A Student can have zero or more minors (maximum of 3 minors). A minor has a Minor_Name, a Minor_Department.
a. Define a class called Minor with appropriate fields and provide the required constructor, accessor (get) and mutator (set) methods. You should also consider the relationship between the Student and Minor classes.
b. Modify the main program developed in Exercise 1c such that, for each Student who has minors, the program prompts the user to enter the minors name and department.
c. Modify the main program to give the user the options to do the following: 1. Print details of all students including the number of minors they take.
2. Print the details of the students who have minors. Each student on two lines: one for the student and one for its minors, if they exist.
3. Print the names of the students who have more than 1 minor.
4. Exit the program.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
