Question: Lab 2 - Classes Overview The purpose of this assignment is give you some experience writing classes in C + + , the various special

Lab 2- Classes
Overview
The purpose of this assignment is give you some experience writing classes in C++, the various special functions they make use of (such as copy constructors, assignment operators, and destructors), as well as an introduction to dynamically allocating memory within those classes.
New Keywords / Language concepts
Classes - conceptually similar to other languages
The std::vector class - similar to Java's ArrayList class, an expandable container
The std::string class - similar in many ways to strings in most every language
Description
This program will represent a hypothetical car dealership, which consists of showrooms that contain the vehicles for sale. To that end, there are three classes you will be writing:
Vehicle
Showroom
Dealership
For this assignment, main.cpp will be provided for you, so you don't have to worry about the structure of the program. Instead, you can focus solely on the structure of the classes and their interactions.
Vehicle
The Vehicle class is the basic container of this assignment. You will need to store the following data as private data members of the class:
A std::string to store the make of the vehicle (such as Mazda, Toyota, etc)
A std::string to store the model of the vehicle (such as Mustang, Model S, F-150, etc)
An unsigned integer to store the year
A float to store the price
An unsigned integer to store the number of miles the vehicle has been driven
In addition to these data members, you should have the following public functions:
 Lab 2- Classes Overview The purpose of this assignment is give

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!