subject
Computers and Technology, 04.04.2020 08:22 momomo4

Reate a base class called Vehicle that has the manufacturer’s name (type string ), number of cylinders in the engine (type int ), and owner (type Person given in the code that follows). Then create a class called Truck that is derived from Vehicle and has additional properties, the load capacity in tons (type double since it may contain a fractional part) and towing capacity in pounds (type int ). Be sure your classes have a reasonable complement of constructors and accessor methods, an overloaded assignment operator, and a copy constructor. Write a driver program that tests all your methods.

The definition of the class Person follows. The implementation of the class is part of this programming project.

class Person

{

public:

Person( );

Person(string theName);

Person(const Person& theObject);

string getName( ) const;

Person& operator=(const Person& rtSide);

friend istream& operator >>(istream& inStream, Person& personObject);

friend ostream& operator <<(ostream& outStream, const Person&

personObject);

private:

string name;

};

ansver
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 21.06.2019 22:00, marvezunderwood
When determining the classification of data, which one of the following is the most important consideration? a. processing systemb. valuec. storage mediad. accessibility
Answers: 2
image
Computers and Technology, 22.06.2019 09:00, jgrable5175
Designing a mobile web page is a little different from designing a regular web page. name at least three features that should be considered when designing a website that is mobile phone-friendly, and briefly explain why they are important.
Answers: 1
image
Computers and Technology, 22.06.2019 21:30, GamerGirl15
This graph compares the total cost of attending educational institutions in texas. the graph demonstrates that the cost at private and public technical schools greatly varies.
Answers: 2
image
Computers and Technology, 22.06.2019 21:30, elsauceomotho
Im doing this last minute and literally none of my neighbors or people that my dad works with use excel so if anyone could me make up an example
Answers: 1
You know the right answer?
Reate a base class called Vehicle that has the manufacturer’s name (type string ), number of cylinde...

Questions in other subjects:

Konu
Mathematics, 22.04.2020 05:04
Konu
Mathematics, 22.04.2020 05:04