Lab 2 – Classes Assignment | Homework Help Websites

nclude the header files for the three classes

Save Time On Research and Writing
Hire a Pro to Write You a 100% Plagiarism-Free Paper.
Get My Paper

Overview

The purpose of this assignment is to give you some experience writing classes in C++, including utilizing accessors and constructors to organize data properlyprofessional writing services near me

Description

This program will represent a hypothetical car production line, which consists of a chassis (body of a vehicle) and wheels. These two components will be used to make fully functioning vehicles (just use your imagination). To that end, there are three classes you will be writing:

Save Time On Research and Writing
Hire a Pro to Write You a 100% Plagiarism-Free Paper.
Get My Paper

• Vehicle

• Chassis

• Wheel

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. I suggest looking at main closely, to help you understand the structure of the project. Chassis The Chassis class is the backbone of your vehicle. You will need to store the following data:

• The size of the chassis (small, medium, large)

• The quality of the chassis (poor, fair, good)

• The number of wheels it can support The number of wheels a given chassis can support is dependent on the size of the vehicle. If the vehicle is small, it functions with 3 wheels (the tri-wheeled wonder).

If it is medium, 4 wheels are required. If the vehicle is large, you will need to have 6 wheels. The default constructor for the chassis will insure it is a medium sized chassis of fair quality. You will also need to implement two more constructors, one that will allow you to specify a size for the chassis, and one that will allow you to specify a size and quality for the chassis. Finally, you will need a getter method for the number of wheels called getNumWheels(). Wheels Your Wheel class should contain variables for the following:

• Mileage Left

• Condition the wheel is in (poor, fair, good) The default condition for Wheels made will be fair. A fair wheel will have 10,000 miles available to it at the start. A good wheel will have 20,000 and a poor wheel will start with 5,000. You will once again need a default constructor and a second constructor that overrides the condition of the wheel. Vehicle The Vehicle class will be the finished product of your production line, being comprised of the other objects defined below. You will need to store the following data: • The price • Wheels • A Chassis (body of car)

• Is it drivable? (Boolean) The quality of the chassis and the condition of the wheels will determine the price of the vehicle. The base price of all vehicles is 500. The chassis will apply a multiplier of 5, 8 or 12 to this, depending on its quality. Likewise, the quality of each wheel will apply a multiplier of 1.5, 1.8 or 2.2. (Maybe price should be a float to account for this?). Additionally, a vehicle only becomes drivable once it has the appropriate number of wheels added to it. An example: A good, small chassis with 2 poor wheels and 1 fair wheel. Bolded is the wheel multipliers (3 of them). 500 * 12 * (1.5 * 1.5 * 2.2) = 29,700 In addition to the above, you will need to implement the following methods:

• addWheel() will is fairly self-explanatory, adding a new wheel object to your car (consider using a vector for this). An additional condition is that if you have already added the max number of wheels for the given vehicle (chassis size), the message “You’ve already added all the wheels!” should be displayed

• isBuilt() should return a Boolean as to whether or not the chassis and all wheels have been added to the vehicle.

• Drive() will give your car the ability to go for a test run. The integer it takes in should be the mileage you want the vehicle to travel. If the value entered is greater than the tire with the least mileage left, you should display the output “Broke Down!”. After every drive print “You’ve traveled x miles!” where x is the amount traveled. If you broke down, this value could be different from the value passed into the function. Additionally, make sure to change the condition of the wheels based on their mileage left. If above 10,000 they are good. If above 5,000 they are fair. Below that you have poor wheels. Keep in mind, a change in condition also means a change in price for the vehicle! Finally, if you attempt to drive the vehicle before it is built, the message “Vehicle not built. Literally un-drivable” should be displayed.

• getChassis() should just return the current vehicle’s chassis.

• Display() should display all the information of a vehicle and its associated chassis and wheels. Here is a sample output: Tips A few tips about this assignment:

• You can print out a tab character (the escape sequence ‘\t’) to help line up theoutput.

• Don’t try to tackle everything all at once. Work on one class at a time. Can’t have a Car without a Chassis.

• You can customize the way numbers are displayed in C++ (particularly floating-point numbers). The header file contains this functionality. Look into std::fixed andstd::setprecision()

Calculate the price
Make an order in advance and get the best price
Pages (550 words)
$0.00
*Price with a welcome 15% discount applied.
Pro tip: If you want to save more money and pay the lowest price, you need to set a more extended deadline.
We know how difficult it is to be a student these days. That's why our prices are one of the most affordable on the market, and there are no hidden fees.

Instead, we offer bonuses, discounts, and free services to make your experience outstanding.
How it works

Here is how simple it is to make use of our essay writing services

step 1

Submit a "write my essay for me" request

Fill out a quick order form and provide detailed requirements as to the paper, its format, etc. You can even attach screenshots or add additional instructions later. If something has to be clarified or added, the writer will contact you directly.
Pro service tips
How to get the most out of your experience with Homework Writing Services
One writer throughout the entire course
If you like the writer, you can hire them again. Just copy & paste their ID on the order form ("Preferred Writer's ID" field). This way, your vocabulary will be uniform, and the writer will be aware of your needs.
The same paper from different writers
You can order essay or any other work from two different writers to choose the best one or give another version to a friend. This can be done through the add-on "Same paper from another writer."
Copy of sources used by the writer
Our college essay writers work with ScienceDirect and other databases. They can send you articles or materials used in PDF or through screenshots. Just tick the "Copy of sources" field on the order form.
Testimonials
See why 20k+ students have chosen us as their sole writing assistance provider
Check out the latest reviews and opinions submitted by real customers worldwide and make an informed decision.
Healthcare & Medical
Thank You for such a great content
Customer 463469, October 29th, 2022
SEO
This was a job well done
Customer 463679, April 20th, 2023
ASCI 491: Operational Applications in Aeronautics
Well articulated.
Customer 457731, April 12th, 2022
Other
The paper is well-written with few errors.
Customer 452455, June 26th, 2023
Sociology
Really beautiful, beautiful work here. Well done! I love this service so much!
Customer 454259, April 11th, 2020
Environmental studies and Forestry
Excellent work.
Customer 458115, May 2nd, 2022
Business
Quality work. Looking forward to your future contributions.
Customer 463467, December 2nd, 2022
Business and administrative studies
GOOD work.
Customer 463105, June 27th, 2022
Education
appreciate your work
Customer 463875, April 29th, 2023
Military
Good job
Customer 456821, May 13th, 2022
Education
Thank you
Customer 463515, October 19th, 2022
Finance/Acc related
Good work.
Customer 460073, July 9th, 2022
11,595
Customer reviews in total
96%
Current satisfaction rate
3 pages
Average paper length
37%
Customers referred by a friend
OUR GIFT TO YOU
15% OFF your first order
Use a coupon FIRST15 and enjoy expert help with any task at the most affordable price.
Claim my 15% OFF Order in Chat