Design an abstract class Student. A student has the following information: ID and GPA. The student...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
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>> probation 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>> probation
Expert Answer:
Related Book For
Systems Analysis and Design in a Changing World
ISBN: 978-1305117204
7th edition
Authors: John W. Satzinger, Robert B. Jackson, Stephen D. Burd
Posted Date:
Students also viewed these databases questions
-
can someone solve this Modern workstations typically have memory systems that incorporate two or three levels of caching. Explain why they are designed like this. [4 marks] In order to investigate...
-
CANMNMM January of this year. (a) Each item will be held in a record. Describe all the data structures that must refer to these records to implement the required functionality. Describe all the...
-
Cadmium is a highly toxic substance with lethal effects on the human body in concentrations greater than 4.4 x 10-mol/L. Cadmium (II) carbonate has a Kp of 5.2 x 10-12 at 25C. Calculate the...
-
Compute Mary's income or deductions for 2015 using (1) The cash basis and (2) The accrual basis for each of the following: a. In May 2015, Mary paid a license fee of $1,200 for the period June 1,...
-
The same reaction that gave 2,4,4-trimethyl-2-pentene also yielded an isomeric alkene. This second alkene produced formaldehyde and 4,4-dimethyl-2-pentanone on ozonolysis. Identify this alkene....
-
Zachary and Carrie Sexton (the Buyers) were searching for a home in the Kings wood neighborhood of Atlanta, Georgia. The Buyers real estate agent learned that Russell and Linda Sewell (the Sellers)...
-
Jane Leeves declared voluntary Chapter 7 bankruptcy. The trustee included the following property in her bankruptcy estate: Janes wedding ring Janes computer for her consulting business that she...
-
An aluminum-alloy rod has a length of 9.2293 cm at 20.00C and a length of 9.2767 cm at the boiling point of water. (a) What is the length of the rod at the freezing point of water? (b) What is the...
-
Han and Leia are college students. They each have $150 per month to spend. They both enjoy driving but also consume a number of other goods. Their utilities functions are (x1,x2) = log(x)+log (x2)...
-
The Guild has engaged in three major strikes, including one in 1959 that lasted nearly 6 months and one in 1988 that lasted 155 days. On May 1, 2017, members voted to strike, but an agreement was...
-
You are a manager at a small firm with 85 employees. Not long ago, your firm had just 15 employees, and it felt like a big family more than a workplace. But as youve grown, the family feeling has...
-
You work for the HR department of a manufacturing firm. The company has 500 employees, a significant portion of whom have long tenure in the company. Eric Jenkins, a department manager who was hired...
-
The Kaiser-Permanente/coalition agreement represents the largest, longestlasting labormanagement partnership in the United States. The Coalition of Kaiser Permanente Unions, AFL-CIO, is a federation...
-
Even though not every layoff victim may feel like a victim, learning about ones impending layoff may be met with anger, humiliation, and a feeling that one is disposable. In some companies, the news...
-
Dave Ltd manufactures glass for the construction industry. The company has two production departments: Machining and Finishing. There are also two support departments: Ordering and Design. The...
-
Controls can be identified based on their function. The functions are preventive, detective, and corrective. A. True B. False
-
What is the difference between HTTPS and HTTP?
-
Using your solution to problem 5, do the following: a. Add the view layer classes and the data access classes to your diagram. b. Develop a package diagram showing a three layer solution with view...
-
1. Draw a first-cut design class diagram (DCD) for the Book a reservation use case. 2. Use the CRC cards technique to identify the classes that are involved in theBook a reservationuse case. Recall...
-
Which mechanism of bacterial genetic transfer does not require recombination with the bacterial chromosome?
-
Explain why small deletions and duplications are less likely than large ones to have a detrimental effect on an individuals phenotype. If a small deletion within a single chromosome happens to have a...
-
Explain why inversions and reciprocal translocations do not usually cause a phenotypic effect. Then explain how they can do so in certain cases.
Study smarter with the SolutionInn App