Question: QUESTION 1 * Consider the following Student class which models a Student. Student class.txt And do the following : - Do the necessary changes to

QUESTION 1
* Consider the following Student class which models a Student.
Student class.txt
And do the following :
- Do the necessary changes to make the class abstract.
- An abstract method getTotalTuition().
* Consider a subclass FreshStudent.
- FreshStudent has two additional instance variable Transportation (int), Books (int) all private.
- Write an appropriate constructor for each of the classes making use of the constructor of the superclass in defining those of the subclasses.
- override getTotalTuition() method that returns
*The total Tuition for a student after adding the Transportation and Books of (FreshStudent).
Tuition + Transportation + Books
- Override also toString() method for each class making use of the toString() method of the superclass in defining those of the subclasses.
(toString() should return something that can be printed on the screen).
* Create the following object from the subclass and print it on the screen.
Student r1= new FreshStudent(201906523,"Sara Abdulaziz",65000,5000,2500);

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!