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...
-
Mauve Corporation began operations as a farm supplies business and used a fiscal year ending October 31. The company gradually went out of the farm supplies business and into the mail-order Christmas...
-
Refer to Exercise 5.49. Now suppose for each plot a fair coin is tossed. If a head shows up, the plot is treated; otherwise, it is a control. With this manner of treatment allocation, answer parts...
-
For the determination of the activity coefficient for the system comprising relatively simple and preferably non-polar liquids, we generally use the (a) Wohl's equation (b) Margules equation (c) Van...
-
Eta Company would like to examine the sales margin and asset components of return on investment for three of its divisions and has accordingly prepared the following information: Required(a) Compute...
-
What factors should be considered when thinking about cost control strategies?
-
Thompson Distributors packages and distributes industrial supplies. A standard shipment can be packaged in a class A container, a class K container, or a class T container. A single class A container...
-
Mayfair Co. completed the following transactions and uses a perpetual inventory system. June 4 Sold $700 of merchandise on credit (that had cost $280) to Natara Morris, terms n/15. 5 Sold $6,600 of...
-
How drilling machines are classified?
-
What is adiabatic index? Give its usual value.
-
Write the characteristic gas equation.
-
Compare the work done in a non-flow and flow type polytropic process.
-
Define thermal efficiency of a heat engine.
-
A rigid tank contains 10 kg of water at 90C. If 8 kg of the water is in the liquid form and the rest is in the vapor form, determine (a) the pressure in the tank and (b) the volume of the tank. T,...
-
Borrowing costs should be recognised as an expense and charged to the profit and loss account of the period in which they are incurred : A. If the borrowing costs relate to qualifying asset B. If the...
-
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...
-
The following table presents the average price, in U.S. dollars per gallon, of unleaded regular gasoline in several countries in the years 2014 and 2016. a. Find the mean and median gas price for...
-
The following table presents the number of active breweries for samples of states located east and west of the Mississippi River. a. Find the mean number of breweries for states east of the...
-
The following table presents prices, in thousands of dollars, of single-family homes for some of the largest metropolitan areas in the United States for the third quarter of 2015 and the third...
Study smarter with the SolutionInn App