Loading...

Messages

Proposals

Stuck in your homework and missing deadline? Get urgent help in $10/Page with 24 hours deadline

Get Urgent Writing Help In Your Essays, Assignments, Homeworks, Dissertation, Thesis Or Coursework & Achieve A+ Grades.

Privacy Guaranteed - 100% Plagiarism Free Writing - Free Turnitin Report - Professional And Experienced Writers - 24/7 Online Support

C++ car class with constructors and accessors

29/11/2021 Client: muhammad11 Deadline: 2 Day

Lab 2 – Classes

Overview The purpose of this assignment is to give you some experience writing classes in C++, including utilizing

accessors and constructors to organize data properly.

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:

• 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 the output.

• 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 and std::setprecision()

Homework is Completed By:

Writer Writer Name Amount Client Comments & Rating
Instant Homework Helper

ONLINE

Instant Homework Helper

$36

She helped me in last minute in a very reasonable price. She is a lifesaver, I got A+ grade in my homework, I will surely hire her again for my next assignments, Thumbs Up!

Order & Get This Solution Within 3 Hours in $25/Page

Custom Original Solution And Get A+ Grades

  • 100% Plagiarism Free
  • Proper APA/MLA/Harvard Referencing
  • Delivery in 3 Hours After Placing Order
  • Free Turnitin Report
  • Unlimited Revisions
  • Privacy Guaranteed

Order & Get This Solution Within 6 Hours in $20/Page

Custom Original Solution And Get A+ Grades

  • 100% Plagiarism Free
  • Proper APA/MLA/Harvard Referencing
  • Delivery in 6 Hours After Placing Order
  • Free Turnitin Report
  • Unlimited Revisions
  • Privacy Guaranteed

Order & Get This Solution Within 12 Hours in $15/Page

Custom Original Solution And Get A+ Grades

  • 100% Plagiarism Free
  • Proper APA/MLA/Harvard Referencing
  • Delivery in 12 Hours After Placing Order
  • Free Turnitin Report
  • Unlimited Revisions
  • Privacy Guaranteed

6 writers have sent their proposals to do this homework:

Instant Assignment Writer
Innovative Writer
Engineering Help
A Grade Exams
Quality Assignments
Top Grade Essay
Writer Writer Name Offer Chat
Instant Assignment Writer

ONLINE

Instant Assignment Writer

I am an elite class writer with more than 6 years of experience as an academic writer. I will provide you the 100 percent original and plagiarism-free content.

$26 Chat With Writer
Innovative Writer

ONLINE

Innovative Writer

I am a professional and experienced writer and I have written research reports, proposals, essays, thesis and dissertations on a variety of topics.

$27 Chat With Writer
Engineering Help

ONLINE

Engineering Help

After reading your project details, I feel myself as the best option for you to fulfill this project with 100 percent perfection.

$20 Chat With Writer
A Grade Exams

ONLINE

A Grade Exams

I have written research reports, assignments, thesis, research proposals, and dissertations for different level students and on different subjects.

$23 Chat With Writer
Quality Assignments

ONLINE

Quality Assignments

I am a professional and experienced writer and I have written research reports, proposals, essays, thesis and dissertations on a variety of topics.

$34 Chat With Writer
Top Grade Essay

ONLINE

Top Grade Essay

I am a PhD writer with 10 years of experience. I will be delivering high-quality, plagiarism-free work to you in the minimum amount of time. Waiting for your message.

$20 Chat With Writer

Let our expert academic writers to help you in achieving a+ grades in your homework, assignment, quiz or exam.

Similar Homework Questions

Screening test for developmental apraxia of speech - Alliteration romeo and juliet - Kilo deci centi milli chart - The Artwork Of Jeff Koons Relate - Nurse practitioner core competencies nonpf - How to find holes in a graph - Defusement - What is accounting short answer - Psych related courses uconn - Sociology Discussion - Homework - Nursing Statistics - Draw two resonance structures of the cation shown below - Research health - George betts primary school - Main range walk map - Comp Crimes & Digital Forensic - Research Paper - Amp flexible super unique superannuation identifier - Connect extend challenge worksheet - 170 bus timetable chesterfield - How companies react to the marketing environment - Aldi waurn ponds opening hours - Wk 4, HCS 430: Laws and Regulations in Health Care - Faust prologue in heaven - A rocket blasts off and moves straight upward - Pope urban ii speech - Merge data files spss - Reflection of Subliminal Advertising - Southwest airlines case study stanford graduate school business - crisis management final project - Experimental design science olympiad - Picot statement paper nrs 490 - Libs 150 research log project 2 answers - Human Resource - Jersey city university nursing - 0.571428 as a fraction - The facebook sonnet sherman alexie analysis - Assignment on marketing plan for a new product ppt - Assignment 1 - Weed and seed declaration - Supreme Court Essay - Lasio keratin treatment aftercare - We even got a secret handshake - Nightingale apartments san diego - Endangered animals persuasive essay - Introduction to search and rescue - Cattell horn's two factor theory - No.1 Google @@]][[[ SAFE ABORTION +27835179056 Identity WOMEN CLINIC//PILLS IN EMPANGENI richards bay Pietermaritzburg Umzimkulu pongola tongaat - Provide extensive additional information on the topic Explain, define, or analyze the topic in detail and Share an applicable personal experience - Honda expands its factory in marysville ohio - MADAM CJ WALKER VS FORD - Fmea multiple choice questions and answers - Reflection - Explain sergio marchionne's leadership style autocratic participative free rein - Establishing an employee leave donation program? - Stewart road car park sheffield - Always to remember by brent ashabranner - Wileyplus com go bb register - History of corrections and punishment - 4 Page APA Report: Explain Continuum of Healthcare Delivery Across Systems and Services - Lbm in sec 2 - Swinburne online teaching period 3 dates - Fractional distillation lab report discussion - Experiment 6 acids bases and salts answers - W211 airmatic relay location - Hum 100 worksheet cultures and artifacts - Cipd level 3 assignment answers - Think like a freak chapter 7 quizlet - Highest pitched brass instrument - Table 2 generation data produced by monohybrid crosses - Selected currently preferred) specialty and second-preferred specialty - Qualified dividends and capital gain tax worksheet 2014 line 44 - Cross cultural consumer behavior - Gcse art and design themes - Ealing community cardiology hanwell - Jennifer aniston aveeno commercial 2019 - Comparaciones en espanol worksheets - Olive garden powerpoint - Hospitality management exam questions and answers - Bank alfalah car financing pakistan - Reaction of potassium iodide with silver nitrate - Examples of managed care organizations - Similarities between public debt and private debt - Reply to discussion- EVA nur501 - How to make navy blue icing without black - Palisade creek co comprehensive problem 2 - Vapor pressure and heat of vaporization lab report answers - Nh4cl acid or base - What is the reaction between zinc and acetic acid - Dissertation Seminar - Enron ethics or culture matters more than codes - Three dimensional structure of pcl3 - Aesthetic and ergonomic considerations in design - Dr dilis clare thyroid - Could the advent of the internet completely eliminate frictional unemployment - Do norwegians still believe in valhalla - +971561686603 Abortion pills in Dubai/Abu Dhabi-mifepristone & misoprostol in DUBAI - Short Paper #1 - Dawson states that he is chairman of the board quizlet - +971561686603 Abortion pills in Dubai/Abu Dhabi-mifepristone & misoprostol in DUBAI