Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Please use C++. I will thumbs up. Thanks! Define the following classes to manage the fleet of a vehicle rental agency. Include one or more
Please use C++. I will thumbs up. Thanks!
Define the following classes to manage the fleet of a vehicle rental agency. Include one or more constructors, destructor and the necessary set and get functions for each class. Also, provide a print function for each class which outputs all the data members of that class. a) Define a class Date that has the following data members: month, day and year. b) Define a class Vehicle that has the following data members: *Model of the vehicle (e.g., Ford, Toyota) as a standard library string. .The date that vehicle has joined to the fleet from part (a). The mileage of the vehicle as an integer. A four digit id of the vehicle as a standard library string, such as string vehicle id "2345" A two-dimensional 12-by-30 array of Boolean variables that shows whether the vehicle is available or has been rented out for each day of the year. If the vehicle is available on a given date then Boolean variable is true and if rented out is false. Each row of the array corresponds to a month and for simplicity we assume that the number of days in each month is 30. c) Derive a Car class from the Vehlcle class, the class should have an additional data member for the passenger capacity as an integer. Derive a Truck class from the Vehicle class, the class should have an additional data member for the weight limit of the truck as an integer. d) Define a class Customer with the following data members: The name of the customer as a standard library string. The driving license of the customer as a library string . . The date of birth of the customer (from part a)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