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.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here