1.

Question 4.[15]private Cab service company provides service within the city at the following rates:AC CARUPTO 5 KM150/-BEYOND SKM10/-PER KMDesign a class CabService with the following description:Member variables data membersNON AC CAR120 -08/- PER KMString car_typedouble kmTo store the type of car (AC or NON AC)To store the kilometer travelleddouble bill- To calculate and store the bill amountMember methodsCabService()- Default constructor to initialize data members.String data members to "" and double datamembers to 0.0.void acceptTo accept car_type and km (using Scanner classonly).void calculate ()To calculate the bill as per the rules given above.void displayTo display the bill as per the following formatCAR TYPE:KILOMETER TRAVELLED:TOTAL BILL:Create an object of the class in the main method and invoke the member methods.​

Answer»

ANSWER:

do t KNOW if know I COULD answer



Discussion

No Comment Found