Question: Define a class Park and inherit 2 classes Park1 and Park2 from the Park class. In both the parks, the entrance fee for adults is
Define a class "Park" and inherit 2 classes "Park1" and "Park2" from the Park class. In both the parks, the entrance fee for adults is Rs. 300 and for children it is Rs.150. If a family buys 'n' adult tickets and 'm' children tickets, define a method in the super class to calculate the total cost. Override this method in the sub class to display with specific information.
java programming
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
