Question: In this assignment, you will create a Java program to create undergraduate and graduate students. 1. The program will keep asking the user if more

 In this assignment, you will create a Java program to create

undergraduate and graduate students. 1. The program will keep asking the user

if more students are to be created. If the user says no,

In this assignment, you will create a Java program to create undergraduate and graduate students. 1. The program will keep asking the user if more students are to be created. If the user says no, the program enters search mode. If the user says yes, the program will ask if an undergraduate student or a graduate student is created. Depending on the answer, the program will ask information about the student and create the student. 2. The program prompts the user to input details of each student including name, id, and gpa. For undergraduate students, the program also asks if the student is a transfer student. For graduate students, the program asks the college the student graduated from. 3. In the search mode, the program keeps asking the user for a student ID. If the student ID is 0, the program will print "Goodbye!" and exit. Otherwise, the program will search for the student ID. If a match is found, the program will call printStudent to print the student information. If no match is found, the program prints "Student ID xxxx not found." For undergraduate students, the program prints their name, id, gpa, and if the student is a transfer student. For graduate students, the program prints their name, id, gpa, and the college they graduated from The program must implement a main class and three student classes (Student, UndergradStudent, GradStudent) which are specified in the following UML class diagram. Student -name: String -id: int -gpa: float +Student +Student(String, int, float) +pring Student():void +getID():int ? W Undegrad Student GradStudent -boolean: is Transfer -college:String +UndergradStudent(String, int, float, boolean) +GradStudent(String, int, float, String) +pring Student():void +pring Student():void All classes must be in the same package. The package name must start with your last name. For example, if your last name is "Biden", your package name must start with Biden uch as "Biden CIS265", "BidenData Structures", etc. You main class file name must start with your last name. For example, if your last name is Spiderman", your main class file name must start with "Spiderman" such as "Spiderman4.java", "SpidermanAssign4.java", etc. You must create an ArrayList of Students in the main class: import java.util.ArrayList; ArrayList students = new ArrayList(); The ArrayList variable will store all Student objects created, both undergraduate students and graduate students. The Student class must have a constructor that takes a name, an id, and a gpa, to create a Student object. . and gpa. The Undergrad Student class must have a constructor that takes a name, an id, a gpa, and a transfer status to create an Undergrad Student object. The constructor must call the Student's constructor using super. The GradStudent class must have a constructor that takes a name, an id, a gpa, and a college to create an GradStudent object. The constructor must call the Student's constructor using super. The Student class must have a public method printStudent() that prints the student's name, id, The Undergrad Student class must override the printStudent() method. It must print the student's name, id, gpa, and transfer status. It must call the Student's printStudent() to print student's name, id, and gpa. The GradStudent class must override the printStudent() method. It must print the student's name, id, gpa, and college. It must call the Student's printStudent() to print student's name, id, and gpa. The printing of students must use dynamic binding: students.get(i).printStudent()

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!