[10]
Question 3
Define a class taximeter having the following description:
Data members/instance variable:
int taxno-to store taxi number
string name - to store passenger's name
int km - to store number of kilometers travelled
Member functions:
taximeter
-constructor to initialize taxino to O name to “”
and km to 0
void input
- to store taxino,name, km
void calculate
to calculate bill for a customer according to given condition.
kilometers travelled(km) Rate/km
<=1 km
25
1<km<=6
* 10
6<km<=12
* 15
12<km<=18
20
>18km
30
void display
- to display the details in the following format
Taxino Name Kilometres travelled
Bill amount
Create an object in the main method and call all the above methods in it. [10]
Answers
Answered by
0
Explanation:
please don't post unnecessary message
Similar questions
Social Sciences,
4 months ago
Math,
4 months ago
Math,
4 months ago
Computer Science,
8 months ago
Biology,
11 months ago
Science,
11 months ago
History,
11 months ago