Question: Abstract Class Calculate Cumulative Grade Point Average ( CGPA ) using Abstract Class An abstract class is a class that is declared by the abstract

Abstract Class
Calculate Cumulative Grade Point Average (CGPA) using Abstract Class
An abstract class is a class that is declared by the abstract keyword, and it may or may not include abstract methods. Abstract classes cannot be instantiated but can be subclassed.
There are three classes: Student, Aided, and SelfFinance.
Task:
Make the Student class abstract.
Declare one abstract method in the Student class - String result(String MarksOfStudent).(This method should be declared as public)
Override the abstract method(result(0), and implement it in the Aided and SelfFinance classes by extending the abstract Student class.
Calculate the CGPA of the student, and return the CGPA in string format (up to two decimal places) for both Aided and SelfFinance classes.
Students are categorized as aided and self. Input (MarksOfStudent) differs based on the type of student.
Aided Student:
There are three sets of marks given for aided students, Subject marks, NCC marks, and Sports marks. The three sets are separated by "l".
Individual Subject marks are separated by comma (,). Each mark is comprised of the subject marks and credit points, which are separated by space (").
In NCC marks, there are three sets of strings. The first one indicates if a student is involved in NCC or not (if 0, you need not consider the subject marks and credit points). The second one is subject marks, and the third one is credit points.
For Sports marks, follow the same procedure as NCC marks.
Self-Finance Student:
 Abstract Class Calculate Cumulative Grade Point Average (CGPA) using Abstract Class

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!