Question: Java Design an abstract class Student. A student has the following information: ID and GPA. The student class has an abstract method getStatus that returns

Java
Java Design an abstract class Student. A student has the following information:

Design an abstract class Student. A student has the following information: ID and GPA. The student class has an abstract method getStatus that returns the status as a string and a nonabstract final method displayStudent that returns the details of a student (ID, GPA and status). Design two subclasses Undergraduate and Graduate. The status of the graduate student is good if his GPA is 3.0 or above otherwise it is probation. The undergraduate's status is honor if his GPA is 3.0 or above, good if his GPA is 2.0 or above, probation otherwise. Write a test class that randomly generates 10 students and prints their type "Undergraduate or Graduate", ID, GPA and status. A sample output is shown below: Undergraduate ID>> 858711 , GPA>> 1.55, Status>> probation Undergraduate ID>> 383254 , GPA >1.83, Status>> probation Undergraduate ID>> 558083, GPA>> 2.55, Status>> good

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!