Question: vehicles.h 2 Problem Using the given class header file (vehicles.h), you will need to implement vehicles.cpp. Do not make any changes to vehicles.h. From the




vehicles.h
2 Problem Using the given class header file (vehicles.h), you will need to implement vehicles.cpp. Do not make any changes to vehicles.h. From the vehicles class you will need to make two child classes, watercraft and automobile. These should also be implemented using separate header and cpp files (e.g., watercraft.h, watercraft.cpp, automobile.h, automobile.cpp) Your watercraft class must have the following: Two additional attributes, hull and manufacture, in the private section. They should be of type string A default constructor that takes no arguments and sets the attributes to: engine to "Minn Kota Max 70" weight to 1860 - - hull to "V - Hul" - seats to 12 -manufacture to "Sea Ark Boats" - Member functions to access and modify these attributes (i.e., seats, engine, hull, etc. must all be able to be changed by calling a member function) -Print to file should take a string as an argument and be a member function. This should be the name of the file to be printed to, your default output file should be out.txt A static int counter that will be used to count how many watercraft objects were created An operator overloaded function that is a member function of the class for the "-" sign that will allow you to copy the information from one watercraft object to another. - Your automobile_class must have the following: Two additional attributes of type string, make and model, and one additional attribute of type int: wheels. All of them should be defined in the private section. 2 Problem Using the given class header file (vehicles.h), you will need to implement vehicles.cpp. Do not make any changes to vehicles.h. From the vehicles class you will need to make two child classes, watercraft and automobile. These should also be implemented using separate header and cpp files (e.g., watercraft.h, watercraft.cpp, automobile.h, automobile.cpp) Your watercraft class must have the following: Two additional attributes, hull and manufacture, in the private section. They should be of type string A default constructor that takes no arguments and sets the attributes to: engine to "Minn Kota Max 70" weight to 1860 - - hull to "V - Hul" - seats to 12 -manufacture to "Sea Ark Boats" - Member functions to access and modify these attributes (i.e., seats, engine, hull, etc. must all be able to be changed by calling a member function) -Print to file should take a string as an argument and be a member function. This should be the name of the file to be printed to, your default output file should be out.txt A static int counter that will be used to count how many watercraft objects were created An operator overloaded function that is a member function of the class for the "-" sign that will allow you to copy the information from one watercraft object to another. - Your automobile_class must have the following: Two additional attributes of type string, make and model, and one additional attribute of type int: wheels. All of them should be defined in the private
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
