Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribedimage text in transcribedimage text in transcribed

image text in transcribed

vehicles.himage text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Modern Database Management

Authors: Jeffrey A. Hoffer Fred R. McFadden

9th Edition

B01JXPZ7AK, 9780805360479

More Books

Students also viewed these Databases questions