Question: ASAP CPS 2231 Lab 7 Assignment ( Inheritance Write a program which will produce a report with the following requirements: 1. Design classes: Student, CS

ASAP
 ASAP CPS 2231 Lab 7 Assignment ( Inheritance Write a program
which will produce a report with the following requirements: 1. Design classes:

CPS 2231 Lab 7 Assignment ( Inheritance Write a program which will produce a report with the following requirements: 1. Design classes: Student, CS GradStudent and CS UnderGradStudent classes as below. Student -studentld: int -firstName: String -lastName: String -email: String testScore: double Student(int id, String fname, String Iname, String email, double testScor) +computeGrade0: String +toString0: String CS UnderGradStudent STUDENT TYPE: String CS UnderGradStudent( int id, String fname, CS GradStudent STUDENT TYPE: String CS GradStudent( int id, String fname, String Iname, String email, double testScore) +computeGrade() : String +toString: String String Iname, String email, double testScore) +computeGrade0 : String +toString0: String 2. STUDENT TYPE is a constant, the value is a. CS GradStudent: STUDENT_TYPE's value is "CS GradStudent" b. CS UnderGradStudent: STUDENT TYPE's value is "CS UnderGradStudent 3. Student class's computeGrade0 method is defined as below. public String computeGrade0 f if (testScore60) return "Pass"; else return "Fail" Subclasses should override this computeGrade0 method with different pass criteria. a. CS GradStudent should have testScore -80 to Pass, b. CS_UnderGradStudent should have test Score >-70 to Pass 4. Implement the toString0 methods for each class a. Superclass's toStringO: returns string include all the data fields b. Subclass's toString0: returns string include all the data fields (including all data fields in super class, Hint: use super.toString0) + computeGrade(

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!