Consider the following class: Use C++ please. Code: class Vehicle{ private: int horsepower; public: string nickname; bool fasterThanSound;; //your method here //}; //your main code here int main() {}...


Consider the following class:


Use C++ please.


Code:


class Vehicle{


private:


int horsepower;


public:


string nickname;


bool fasterThanSound;;


//your method here


//};


//your main code here


int main() {}


1.)Define a method for this class speedUp() that will increase the horsepower of the vehicle by 100.


2.)Next, in main():


Declare a Vehicle object and call the speedUp() method on the object.



Jun 09, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here