Answered step by step
Verified Expert Solution
Question
1 Approved Answer
You are designing a simple application for an electric cars - only parking garage company. This garage assumes there are only 3 brands of cars
You are designing a simple application for an electric carsonly parking garage company. This garage assumes there are only brands of cars Rivian Tesla, and ViaFast and types of cars Sedan SUV, and Truck with only available car colours Black White, Blue, Silver, and Grey Write a C class EV based on the following: tableEVcolour: stringplateNumber: stringtype: stringslotNumber: intparkingFee: doubletotalParkingFee: static doublecarCount: static intEV OEV string string, string, stringEV const EV &setBrandstring: voidsetColorstring: voidsetPlateNumberstring: voidsetTypestring: voidprintCarDetails: voidgetTotalParkingFees: static doublegetCarCount: static int EV O i Initialize "totalParkingFees" to and "carCount" to ii The default constructor will prompt the user to enter the details of the car brand colour, plateNumber, and type Ensure the entered values for brand, colour, and type are valid. If not, prompt the user to reenter until valid values are provided. Set parking fees based on the car type Sedan: SUV: Truck: Update "totalParkingFee" accordingly. Increment "carCount" and set slot number assign the new "carCount" to slot iii. The parameterized constructor accepts brand, plateNumber, colour, and type. Repeat step ii iv The copy constructor copies details for an existing car object. Increment "carCount", update "totalParkingfee", and set slot number. v The destructor updates "totalParkingfee" and "carCount". Print appropriate deletion message. vi Create setters and getters methods. Update "totalParkingfee" in "setType". vii. Create "printCarDetails" method. In the main: i Create ev using default constructor. ii Create ev using parameterized constructor. iii. Create ev using copy constructor from ev iv Create ev using parameterized constructor. Prompt user for details. v Update ev details using setter methods. vi Print all the cars details. vii. Print the daily statistics Average income totalParkingFeescarCount
You are designing a simple application for an electric carsonly parking garage company. This garage assumes there are only brands of cars Rivian Tesla, and ViaFast and types of cars Sedan SUV, and Truck with only available car colours Black White, Blue, Silver, and Grey Write a C class EV based on the following:
tableEVcolour: stringplateNumber: stringtype: stringslotNumber: intparkingFee: doubletotalParkingFee: static doublecarCount: static intEV OEV string string, string, stringEV const EV &setBrandstring: voidsetColorstring: voidsetPlateNumberstring: voidsetTypestring: voidprintCarDetails: voidgetTotalParkingFees: static doublegetCarCount: static int EV O
i Initialize "totalParkingFees" to and "carCount" to
ii The default constructor will prompt the user to enter the details of the car brand colour, plateNumber, and type Ensure the entered values for brand, colour, and type are valid. If not, prompt the user to reenter until valid values are provided. Set parking fees based on the car type Sedan: SUV: Truck: Update "totalParkingFee"
accordingly. Increment "carCount" and set slot number assign the new "carCount" to slot
iii. The parameterized constructor accepts brand, plateNumber, colour, and type. Repeat step ii
iv The copy constructor copies details for an existing car object. Increment "carCount", update "totalParkingfee", and set slot number.
v The destructor updates "totalParkingfee" and "carCount". Print appropriate deletion message.
vi Create setters and getters methods. Update "totalParkingfee" in "setType".
vii. Create "printCarDetails" method.
In the main:
i Create ev using default constructor.
ii Create ev using parameterized constructor.
iii. Create ev using copy constructor from ev
iv Create ev using parameterized constructor. Prompt user for details.
v Update ev details using setter methods.
vi Print all the cars details.
vii. Print the daily statistics Average income totalParkingFeescarCount
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started