include the header files for the three 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 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()
Main class
#include “Vehicle.h”#include “Wheel.h”#include
int main(){Wheel plainWheel;
Chassis plainChassis(“medium”);Vehicle firstCar(plainChassis);
for(int i=0; i < firstCar.getChassis().getNumWheels(); i++) {firstCar.addWheel(plainWheel);}
//since all plainWheels have been added, it should be builtif(firstCar.isBuilt()) {std::cout << “Built!n” << std::endl;firstCar.Display();}
Chassis superChassis(“large”,”good”);Vehicle superCar(superChassis);
if(!superCar.isBuilt()) {std::cout << “Where are the wheels!n” << std::endl;}
Wheel superWheel(“good”);
superCar.addWheel(superWheel);superCar.addWheel(superWheel);superCar.addWheel(superWheel);superCar.addWheel(superWheel);
superCar.addWheel(plainWheel);superCar.addWheel(plainWheel);
superCar.Display();superCar.Drive(8000);superCar.Display();
Wheel badWheel(“poor”);Chassis reallyBadChassis(“small”, “poor”);Vehicle badCar(reallyBadChassis);
for(int i=0; i < badCar.getChassis().getNumWheels(); i++) {badCar.addWheel(badWheel);}
badCar.Display();badCar.Drive(6000);badCar.Display();
return 0;}
"Looking for a Similar Assignment? Get Expert Help at an Amazing Discount!"
Include Io H Cr Lf Equ Equ 0dh 0ah Data Carriage Text Byte Byte Outputw Macro Ou
/in Uncategorized /by developerEND
Program #2 Vankin’s Mile 12.5%Due: 10/14/2015Assignment:
Vankin’s Mile is a solitaire game played on an n x n square grid. The player starts by placing a token on any square of the grid. Then on each turn, the player moves the token either one square to the right or one square down. The game ends when player moves the token off the edge of the board. Each square of the grid has a numerical value, which could be positive, negative, or zero. The player starts with a score of zero; whenever the token lands on a square, the player adds its value to his/her score. The object of the game is to score as many points as possible. For example, given the grid below, the player can score 8-6+7-3+4 = 10 points by placing the initial token on the 8 in the second row, and then moving down, down, right, down, down.
-1 7 -8 10 -5-4 -9 8 -6 05 -2 11 -6 7-12 4 7 -3 -37 1 -6 4 -9
Allow the Vankin’s Mile grid to be specified in an input file.
Allow the user to type vankins <vankins_in.txt at the command prompt to execute your program. Display both the input grid and the fully computed output grid to the console. Have your output grid formatted as below. Below your output grid, show the path that must be taken from (1,1) for the best possible score.
25 26 19 12 218 18 27 1 722 17 19 1 70 12 8 1 -38 1 -2 4 -9Looping Through an Array More Basic Instructions
Submission: Submit Electronically:
"Looking for a Similar Assignment? Get Expert Help at an Amazing Discount!"
Include Questions To The Paper And See Attached Files For The Sources Due 31 Jan
/in Uncategorized /by developerinclude questions to the paper and see attached files for the sources. due 31 January 2019 at 1:00pm eastern time zone.
After studying the assigned reading The Handbook of Communication Science, Second Edition: Chapter 20: Media Entertainment, considering the topic of parasocial relationships, answer the following questions or prompts.
A) Identify a character in a show with whom you have developed (in the past or present) a parasocial relationship. Remember, this personal can be “real” or a character role. Explain why this character/person is compelling to you.
B) How do you “know” or view this character outside of their role on the show? Have they influenced you in any way besides the aspect of entertainment?
C) Explain any emotional attachment to the character or person. Have they disappointed you? Motivated you? How and why?
Support your responses with research from the Learning Resources. Use APA in-text citations where necessary and cite any outside sources. Create an APA Reference List or Bibliography at the end of the document.
"Looking for a Similar Assignment? Get Expert Help at an Amazing Discount!"
Include The Following In Your Diagram
/in Uncategorized /by developerhello, Draw and label a negative feedback system for a home heating and coolingsystem. Include the following in your diagram: furnace, air conditioning unit,thermostat, coordinating centre, and regulators.
"Looking for a Similar Assignment? Get Expert Help at an Amazing Discount!"
Include The Following In Your Outline Name Of Enzyme You Will Use Name Of Organi
/in Uncategorized /by developerInclude the following in your outline:
Write a lab report that includes the following:
1. Title page: descriptive title, your name, course name, semester
2. Introduction: general background information about enzymes and specific information about your chosen enzyme, the question(s) that you are asking and a clear hypothesis for your experiment (20 points).
3. Design an experiment. Provide a detailed description of the materials and methods used to conduct the experiment. Identify control and experimental samples, as well as independent and dependent variables. Also include the methods used for data collection and analysis (20 points).
4. Conduct the experiment and record your results. Take picture(s) of your results. What did you observe? Present your data in table and/or graph format. Remember to label everything and include the unit of measure with all numbers (20 points)
5. Use your knowledge of enzymes and pH to interpret and discuss your results. It may be necessary for you to refer to the text book and course modules, lab manual and/or use additional information resources. What effect does the acidic treatment have on enzyme activity? Did you get the expected results? Explain. (20 points)
6. State a specific and accurate conclusion. Is your hypothesis supported by the results? Looking back, how could you have improved your experiment? (10 points)
7. Include a list of references to all information sources used in APA format (5 points).
"Looking for a Similar Assignment? Get Expert Help at an Amazing Discount!"
Include The Header Files For The Three Classesoverviewthe Purpose Of This Assign
/in Uncategorized /by developerinclude the header files for the three 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 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()
Main class
#include “Vehicle.h”#include “Wheel.h”#include
int main(){Wheel plainWheel;
Chassis plainChassis(“medium”);Vehicle firstCar(plainChassis);
for(int i=0; i < firstCar.getChassis().getNumWheels(); i++) {firstCar.addWheel(plainWheel);}
//since all plainWheels have been added, it should be builtif(firstCar.isBuilt()) {std::cout << “Built!n” << std::endl;firstCar.Display();}
Chassis superChassis(“large”,”good”);Vehicle superCar(superChassis);
if(!superCar.isBuilt()) {std::cout << “Where are the wheels!n” << std::endl;}
Wheel superWheel(“good”);
superCar.addWheel(superWheel);superCar.addWheel(superWheel);superCar.addWheel(superWheel);superCar.addWheel(superWheel);
superCar.addWheel(plainWheel);superCar.addWheel(plainWheel);
superCar.Display();superCar.Drive(8000);superCar.Display();
Wheel badWheel(“poor”);Chassis reallyBadChassis(“small”, “poor”);Vehicle badCar(reallyBadChassis);
for(int i=0; i < badCar.getChassis().getNumWheels(); i++) {badCar.addWheel(badWheel);}
badCar.Display();badCar.Drive(6000);badCar.Display();
return 0;}
"Looking for a Similar Assignment? Get Expert Help at an Amazing Discount!"
Include The Name Of The Director You Identified In The Subject Line Of Your Disc
/in Uncategorized /by developerInclude the name of the director you identified in the “Subject” line of your discussion. Your initial post should
be at least 200 words in length. Support your claims with examples from the required material(s) and/or other scholarly sources, and properly cite any references.
"Looking for a Similar Assignment? Get Expert Help at an Amazing Discount!"
Include Your Name And The Name Of The Local Company Organization Selected Cite Y
/in Uncategorized /by developer"Looking for a Similar Assignment? Get Expert Help at an Amazing Discount!"
Included In My Spreadsheet How Would I Set This Up Using The Company Information
/in Uncategorized /by developerWhat data should be included in my spreadsheet, how would I set this up using the company information that I have attached? What page of this financial report can I use?
Compute and analyze the financial data using a Microsoft® Excel® spreadsheet. Make sure all calculations can be seen in the background of the applicable spreadsheet cells. In other words, leave an audit trail so others can see how you arrived at your calculations and analysis. Items should be submitted in Microsoft® Excel®; indicate your recommendation in the Microsoft® Excel® spreadsheet:
Calculate the 5-year projected income.
Calculate a 5-year projected cash flow.
Calculate net present value (NPV).
Calculate the internal rate of return (IRR).
Determine if the team would recommend acquiring this company based on the 4 calculations above; do you recommend acquiring this company?
"Looking for a Similar Assignment? Get Expert Help at an Amazing Discount!"
Income Earned By C Corporations Is Taxed Twice Once When The Income Is Earned An
/in Uncategorized /by developerIncome earned by C corporations is taxed twice, once when the income is earned and again when it is distributed. If so, how is it possible that operating a business as a C corporation can reduce taxes?
"Looking for a Similar Assignment? Get Expert Help at an Amazing Discount!"
Income Inequality Review This Statement
/in Uncategorized /by developerIncome Inequality
Review this statement. “A county with more of poor neighborhoods usually earn less tax money and would have less money to support a public school comparing to a county with no poor neighborhoods. Students from a public school that receives more supporting money are generally perform better than students from a public school that receives less supporting money. Therefore, the poor will destine to be poorer and the rich will destine to be richer.” Is this statement true in our nowadays economy? Why or why not? How does our tax system help reduce the distant between the upper class and the lower class?
It is clear that our system of allocation of resources is efficient yet not “equitable” or “fair.” From our textbook and the study/review of the above statement you have seen that governments have a political and economic role and among those issues addressed by government is income inequality. There are widely differing opinions as to the causes of inequality and even more opinions on how to address the issue. Should our tax system be changed? Why or Why not? To what extent do you think that income inequality is the result of choices made by individuals? Should they and only they be held responsible for their situation and their choices? Is it fair that a person who earns 45 million dollars (from capital investment) a year only pay 15% of his earning as tax while a librarian who earns 36,000 dollars a year pay 13% of her earning as tax? Should our government do more or less regarding the income inequality in the US? Why or Why not?
You are more than welcome to add many other aspects, data, facts, and analysis to the discussion.
REMEMBER: This is NOT a business ethic class or a religious study group or a personal story time. Use economics theories when you answer questions and argue your case.
"Looking for a Similar Assignment? Get Expert Help at an Amazing Discount!"