Question: please solve it using java Tost 4 - Consider an abstract superclass Student which models a Student. This class has: - Three private instance variables

please solve it please solve it using java Tost 4 - Consider an abstract superclass
using java

Tost 4 - Consider an abstract superclass Student which models a Student. This class has: - Three private instance variables Id (int) StudName (String) and Fees (int). - One constructor to initialize the instance variables. - An abstract method getFees(). - toStringO method to return the Id, StudName and Fees. - Consider a subelasses RegularStudent. - RegularStudent has only one additional instance variable Transportation (int) private. Write an appropriate constructor for each of the classes making use of the constructor of the superclass in defining those of the subelasse getFees0 method that returns o The total Fees for a student after adding the Transportation of (RegularStudent). F=F+T Override also toString 0 method for each class making use of the toString 0 method of the superclass in defining those of the subclasses. (toString 0 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 RegularStudent(201300234,"Samah Abdullah", 60000,4000); Output should be like the following

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!