Project : Class creation and Inheritance ( C++ C++ C++ C++ C++ oop projects!!!!!! ) To start off this project, you need
Posted: Mon Jun 06, 2022 12:56 pm
Project : Class creation and Inheritance (
C++ C++ C++ C++ C++ oop projects!!!!!! )
To start off this project, you need to create
a Vehicle class. Through inheritance you will create its
children as well: Truck, Car, and Motorcycle. In
this project you will use separate compilation with g++ to link
multiple classes into one executable, and, in order to successfully
complete this project,
Implementation:
Work incrementally! Work through the tasks
sequentially (implement and test). Only move on to a task when you
are positive that the previous one has been completed correctly.
Remember that the names of function prototypes and member variables
must exactly match those declared in the respective header file
when implementing a class.
Define and implement the
abstract Vehicle.hpp and Vehicle.cpp class.
The Vehicle class will have these member variables which should
be private:
The Vehicle class will have these member functions, all
public:
CHOOSE YOUR VEHICLE!
After you are finished implementing the Vehicle class,
now you have to define and implement
the Car, Motorcycle and Truck classes as
inherited children of the Vehicle class.
The Car class represents an Vehicle object with the
following specifications:
The Car class must contain the following methods,
knowing the information above and that each
constructor must call
the Vehicle parameterized constructor:
And for the private members it should only contain a vector of
strings, that will be named as vectorstd::string
list_of_bumper_stickers_
The Motorcycle class represents an Vehicle object with
the following specifications:
The Motorcycle class must contain the following
methods, knowing the information above and that each
constructor must call
the Vehicle parameterized constructor:
And as for the private members for motorcycle,
you must have a variable bool
sideMotorcycle_ that represents if the motorcycle has
a side car.
The Truck class represents an Vehicle object with the
following specifications:
The Truck class must contain the following methods,
knowing the information above and that each
constructor must call
the Vehicle parameterized constructor:
Here is the private variable for the truck
class bool hasTrailer_
You will submit the following files:
Car.hpp Car.hpp
Motorcycle.cpp
Motorcycle.hpp
Truck.cpp
Truck.hpp Vehicle.cpp Vehicle.hpp
C++ C++ C++ C++ C++ oop projects!!!!!! )
To start off this project, you need to create
a Vehicle class. Through inheritance you will create its
children as well: Truck, Car, and Motorcycle. In
this project you will use separate compilation with g++ to link
multiple classes into one executable, and, in order to successfully
complete this project,
Implementation:
Work incrementally! Work through the tasks
sequentially (implement and test). Only move on to a task when you
are positive that the previous one has been completed correctly.
Remember that the names of function prototypes and member variables
must exactly match those declared in the respective header file
when implementing a class.
Define and implement the
abstract Vehicle.hpp and Vehicle.cpp class.
The Vehicle class will have these member variables which should
be private:
The Vehicle class will have these member functions, all
public:
CHOOSE YOUR VEHICLE!
After you are finished implementing the Vehicle class,
now you have to define and implement
the Car, Motorcycle and Truck classes as
inherited children of the Vehicle class.
The Car class represents an Vehicle object with the
following specifications:
The Car class must contain the following methods,
knowing the information above and that each
constructor must call
the Vehicle parameterized constructor:
And for the private members it should only contain a vector of
strings, that will be named as vectorstd::string
list_of_bumper_stickers_
The Motorcycle class represents an Vehicle object with
the following specifications:
The Motorcycle class must contain the following
methods, knowing the information above and that each
constructor must call
the Vehicle parameterized constructor:
And as for the private members for motorcycle,
you must have a variable bool
sideMotorcycle_ that represents if the motorcycle has
a side car.
The Truck class represents an Vehicle object with the
following specifications:
The Truck class must contain the following methods,
knowing the information above and that each
constructor must call
the Vehicle parameterized constructor:
Here is the private variable for the truck
class bool hasTrailer_
You will submit the following files:
Car.hpp Car.hpp
Motorcycle.cpp
Motorcycle.hpp
Truck.cpp
Truck.hpp Vehicle.cpp Vehicle.hpp