Question: solved in java please read the problem carefully 1 Abstract Classes Task Design an abstract class Student. A student has the following data fields: Id

solved in java please read the problem carefully
solved in java please read the problem carefully 1 Abstract Classes Task

1 Abstract Classes Task Design an abstract class Student. A student has the following data fields: Id and GPA. The student class has an abstract method gst Status that returns the status as a string. 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 program that declares an array of type Student Make some elements Undergraduate objects and some elements Graduate objects with random values. For every student, print his Id, GPA, and status. Notes: Save every class in a separate file Data fields should be private. . Sample output: the word Undergraduate or Graduate will be displayed using instanceof operator Undergraduate: id: 123 spa: 3.5 status: Honor Graduate: id: 734 gpa: 3.7 status: Good Graduate: id: 778 gpa: 2.4 status: Probation Undergraduate: id: 234 gpa: 2.5 status: Good Undergraduate: id: 524 spa: 1.5 status: Probation

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!