Write a program to design a class park having the following description:
Data members
double fee : to accept the entry fee of the amusement park.
int age: accept the age in years
double discount: stores the discount amount double amount: stores the amount to be paid after discount
Member methods:
void input (): accept values for fee and age.
void calculate (): calculate the amount payable by giving discount
chart.
Age In years)
<=12
>=60
Otherwise
discount on entry fees
40%
50%
15%
void display () : Display the age and the amount to pay after discount. Write a main method to create an object of class park and call the above member methods.
plz help some1
Answers
Answered by
0
void calculate (): calculate the amount payable by giving discount
Similar questions
English,
3 months ago
French,
3 months ago
Computer Science,
7 months ago
Social Sciences,
7 months ago
Math,
1 year ago
Social Sciences,
1 year ago