Question

#include <iostream> #include "Vehicle.h" #include "Warranty.h" #include "Hybrid.h" using namespace std; //insert comment describing these set...

#include <iostream>
#include "Vehicle.h"
#include "Warranty.h"
#include "Hybrid.h"
using namespace std;

//insert comment describing these set of statements here
void DisplayDivider(string);
string GetInput(string);
void DisplayApplicationInformation();
void TerminateApplication();

int main()
{
   DisplayDivider("Start Program");
   DisplayApplicationInformation();

   //insert comment describing these set of statements here
   DisplayDivider("Vehicle 1");
   vehicle vehicle1;
   vehicle1.setMake(GetInput("vehicle make"));
   vehicle1.setYear(GetInput("vehicle year"));
   vehicle1.setMileage(GetInput("vehicle MPG"));
   warranty warranty1;
   warranty1.setNumYears(atoi(GetInput("number of years covered under warranty").c_str()));
   warranty1.setNumMiles(atoi(GetInput("number of miles covered under warranty").c_str()));
   vehicle1.setWarranty(warranty1);
   vehicle1.displayVehicle();

   //insert comment describing these set of statements here
   DisplayDivider("Vehicle 2");
   warranty warranty2(6, 70000);
   vehicle vehicle2("Cadillac", 2017, 26.5, warranty2);
   vehicle2.displayVehicle();

   //insert comment describing these set of statements here
   vehicle vehicle3(vehicle2);
   vehicle3.~vehicle();

   //insert comment describing these set of statements here
   DisplayDivider("Vehicle 3");
   warranty warranty3(5, 60000);
   hybrid hybrid1(570, "Toyota", 2017, 52, warranty3);
   hybrid1.displayVehicle();

   //insert comment describing these set of statements here
   cout << "\nTotal Number of Vehicles: " << vehicle::getVehicleNumber() << endl;
   TerminateApplication();
   return 0;
}

//insert comment describing these set of statements here
void DisplayApplicationInformation()
{
   cout << "Welcome to CIS247C Week 7 Lab!\n";
   cout << "This program prompts the user for vehicle information \nand displays the gathered information and whether the \nvehicle is under warranty. The concepts of encapsulation, \ncomposition, inheritance, and abstract classes are \nimplemented throughout this program." << endl;
}

//insert comment describing these set of statements here
void DisplayDivider(string message)
{
   cout << "\n**************** " + message + " ****************\n";
}

//insert comment describing these set of statements here
string GetInput(string message)
{
   string input;
   cout << "Please enter " << message << ": ";
   getline(cin, input);
   return input;
}

//insert comment describing these set of statements here
void TerminateApplication()
{
   cout << "\nEnd of CIS247C Week 3.145926535 Lab\n" << endl;
}

====================================================================================================

In Source file:

Insert comments describing set of statements as indicated.

Check format of output.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

program cannot be executed as you did not provide the header files

Add a comment
Know the answer?
Add Answer to:
#include <iostream> #include "Vehicle.h" #include "Warranty.h" #include "Hybrid.h" using namespace std; //insert comment describing these set...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • In Source file: Insert comments describing set of statements as indicated. Check format of output. ====================================================================================================...

    In Source file: Insert comments describing set of statements as indicated. Check format of output. ==================================================================================================== #include <iostream> #include "Vehicle.h" #include "Warranty.h" #include "Hybrid.h" using namespace std; //insert comment describing these set of statements here void DisplayDivider(string); string GetInput(string); void DisplayApplicationInformation(); void TerminateApplication(); int main() {    DisplayDivider("Start Program");    DisplayApplicationInformation();    //insert comment describing these set of statements here    DisplayDivider("Vehicle 1");    vehicle vehicle1;    vehicle1.setMake(GetInput("vehicle make"));    vehicle1.setYear(GetInput("vehicle year"));    vehicle1.setMileage(GetInput("vehicle MPG"));    warranty warranty1;    warranty1.setNumYears(atoi(GetInput("number...

  • //Vehicle.h #pragma once #include<iostream> #include"Warranty.h" #include<string> using namespace std; class Vehicle{ protected:    string make; int year;   ...

    //Vehicle.h #pragma once #include<iostream> #include"Warranty.h" #include<string> using namespace std; class Vehicle{ protected:    string make; int year;    double mpg;    Warranty warranty;    static int numOfVehicles; public:    Vehicle();    Vehicle(string s, int y, double m, Warranty warranty);    Vehicle(Vehicle& v);    ~Vehicle();    string getMake();    int getYear();    double getGasMileage();    void setMake(string s);    void setYear(int y);    void setYear(string y);    void setGasMileage(double m);    void setGasMileage(string m);    void displayVehicle();    static int getNumVehicles();    Warranty getWarranty();    void setWarranty(Warranty& ); }; //Vehicle.cpp #include "Vehicle.h" #include <string> Vehicle::Vehicle() {    make = "unknown";    year =...

  • CIS247C Week 3 Project Overview The objective of this week is to enhance last week's Vehicle cla...

    CIS247C Week 3 Project Overview The objective of this week is to enhance last week's Vehicle class by making the following changes: • Create a static variable called numVehicles that holds an int and initialize it to zero. This will allow us to count all the Vehicle objects created in the main class. • Add the copy constructor • Increment numVehicles in all of the constructors • Decrement numVehicle in destructor • Add overloaded versions of setYear and setMpg that...

  • #include <iostream> #include <stack> #include <queue> using namespace std; void printFromStack(string expr){ stack<char> myStack; for(int i=0;...

    #include <iostream> #include <stack> #include <queue> using namespace std; void printFromStack(string expr){ stack<char> myStack; for(int i=0; i<expr.length(); i++){ //Insert code here to push each character onto the stack } cout << "My stack is popped in this order" << endl; while(!myStack.empty()){ //Insert code here to cout the top of the stack one by one //Pop each one after it’s printed out } cout << endl; } void printFromQueue(string expr){ queue<char> myQueue; //Insert code here to push each character onto the...

  • This is C++ code for parking fee management program #include <iostream> #include <iomanip> using namespace std;...

    This is C++ code for parking fee management program #include <iostream> #include <iomanip> using namespace std; void input(char& car, int& ihour,int& imin, int& ohour, int& omin); void time(char car, int ihour, int imin, int ohour, int omin, int& phour, int& pmin, int& round, double& total); void parkingCharge (char car, int round, double& total); void print(char car, int ihour, int imin, int ohour, int omin, int phour, int pmin, int round, double total); int main() { char car; int ihour; int...

  • Write a psuedocode for this program. #include <iostream> using namespace std; string message; string mappedKey; void...

    Write a psuedocode for this program. #include <iostream> using namespace std; string message; string mappedKey; void messageAndKey(){ string msg; cout << "Enter message: "; getline(cin, msg); cin.ignore(); //message to uppercase for(int i = 0; i < msg.length(); i++){ msg[i] = toupper(msg[i]); } string key; cout << "Enter key: "; getline(cin, key); cin.ignore(); //key to uppercase for(int i = 0; i < key.length(); i++){ key[i] = toupper(key[i]); } //mapping key to message string keyMap = ""; for (int i = 0,j...

  • #include<iostream> #include<string> #include<iomanip> using namespace std; /* ********* Class Car ************* ********************************* */ class Car {...

    #include<iostream> #include<string> #include<iomanip> using namespace std; /* ********* Class Car ************* ********************************* */ class Car { private: string reportingMark; int carNumber; string kind; bool loaded; string choice; string destination; public: Car() { reportingMark = ""; carNumber = 0; kind = "Others"; loaded = 0; destination = "NONE"; } ~Car() { } void setUpCar(string &reportingMark, int &carNumber, string &kind, bool &loaded, string &destination); }; void input(string &reportingMark, int &carNumber, string &kind, bool &loaded,string choice, string &destination); void output(string &reportingMark, int &carNumber,...

  • #include <fstream> #include <iostream> #include <cstdlib> using namespace std; // Place charcnt prototype (declaration) here int...

    #include <fstream> #include <iostream> #include <cstdlib> using namespace std; // Place charcnt prototype (declaration) here int charcnt(string filename, char ch); int main() { string filename; char ch; int chant = 0; cout << "Enter the name of the input file: "; cin >> filename; cout << endl; cout << "Enter a character: "; cin.ignore(); // ignores newline left in stream after previous input statement cin.get(ch); cout << endl; chcnt = charcnt(filename, ch); cout << "# of " «< ch« "'S:...

  • C++ assignment. Please help me to complete this code: #include <string> #include <iostream> using namespace std;...

    C++ assignment. Please help me to complete this code: #include <string> #include <iostream> using namespace std; // Write your function here //////////////// STUDENT TESTING //////////////////// int run() { cout << "Student testing" << endl; strip(); return 0; } Here is the instruction: Write a filter function named strip that removes C++ comments from input, sending the uncommented portion of the program to output. Your program should work with both single line (//) comments, and multi-line (/* */) comments. + A...

  • please help me fix the error in here #include<iostream> #include <string> using namespace std; string getStudentName();...

    please help me fix the error in here #include<iostream> #include <string> using namespace std; string getStudentName(); double getNumberExams(); double getScoresAndCalculateTotal(double E); double calculateAverage(double n, double t); char determineLetterGrade(); void displayAverageGrade(); int main() { string StudentName; double NumberExam, Average, ScoresAndCalculateTotal; char LetterGrade; StudentName = getStudentName(); NumberExam = getNumberExams(); ScoresAndCalculateTotal= getScoresAndCalculateTotal(NumberExam); Average = calculateAverage(NumberExam, ScoresAndCalculateTotal); return 0; } string getStudentName() { string StudentName; cout << "\n\nEnter Student Name:"; getline(cin, StudentName); return StudentName; } double getNumberExams() { double NumberExam; cout << "\n\n Enter...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT