Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C++ -------------------------------------------------- vehicles.h - #ifndef GA2_VEHICLES_H #define GA2_VEHICLES_H #include using namespace std; class vehicles { protected: string engine; int seats; int weight; public: vehicles(); static

C++

image text in transcribedimage text in transcribed

--------------------------------------------------

vehicles.h -

#ifndef GA2_VEHICLES_H #define GA2_VEHICLES_H #include  using namespace std; class vehicles { protected: string engine; int seats; int weight; public: vehicles(); static int count; }; #endif //GA2_VEHICLES_H 

-------------------------------------------------

Output Examples -

Watercraft: Engine: Minn Kota Max 70 Weight: 1860lbs Seats: 12 Hull: V - Hull Manufacturer: Sea Ark Boats Watercraft: Engine: Yamaha 115 HP Weight: 5200lbs Seats: 10 Hull: Fiberglass Manufacturer: Sea Ark Boats Automobile: Engine: V6 Wheels: 4 Weight: 4079lbs Seats: 2 Make: Toytoa Model: Solara Automobile: Engine: 3A90 I3 Wheels: 4 Weight: 2072lbs Seats: 5 Make: Mirage Model: Mitsubishi Automobile: Engine: V6 Wheels: 4 Weight: 4079lbs Seats: 2 Make: Honda Model: Accord Watercraft: Engine: Yamaha 115 HP Weight: 5200lbs Seats: 10 Hull: Fiberglass Manufacturer: Sea Ark Boats Automobile: Engine: 3A90 I3 Wheels: 4 Weight: 2072lbs Seats: 5 Make: Mirage Model: Mitsubishi Vehicles created: 7 Automobiles created: 4 Watercraft created: 3 
COSC 1430 - Group Assignment 2 Classes, Inheritance, Operator Overloading TO BE TURNED IN ON BLACKBOARD - 1 submission per group 1 - Objective Enhance the understanding of classes, inheritance, and operator overloading 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 - -eneine to "Minn Kota Max 70" - eight to 1860 -hull to "V- Hull" - 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

Database Processing

Authors: David M. Kroenke

12th Edition International Edition

1292023422, 978-1292023427

More Books

Students also viewed these Databases questions

Question

a y y y 4 x x x 1 25 cos 2 x 11 b y 2y y 2y ex sih 2x

Answered: 1 week ago

Question

Identify three ways to manage an intergenerational workforce.

Answered: 1 week ago

Question

Prepare a Porters Five Forces analysis.

Answered: 1 week ago

Question

Analyze the impact of mergers and acquisitions on employees.

Answered: 1 week ago