Answered step by step
Verified Expert Solution
Question
1 Approved Answer
IN JAVA PLEASE !!! Design an abstract class Student. A student has the following information: ID and GPA. The student class has an abstract method
IN JAVA PLEASE !!!
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 non-abstract 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 Graduate ID>> 464910 , GPA>> 0.9, Status>> probation Undergraduate ID>> 383254, GPA >>1.83, Status>> probation Graduate ID>> 119240, GPA>> 3.66, Status>> good Undergraduate ID>> 520227, GPA>> 2.18, Status>> good Graduate ID>> 47816, GPA>> 3.65, Status>> good Undergraduate ID>> 558083, GPA>> 2.55, Status>> good Graduate ID>> 918083, GPA>> 2.7, Status>> probation Undergraduate ID>> 714181, GPA>> 3.4, Status>> honor Graduate ID >>332491, GPA >>0.63, Status >> probationStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started