Q1: Implement a class called Vehicle. a) A class named Vehicle b) Two private data members: brand (string), model (string), price (int). c) Accessors and Mutators function for brand, value, and price....


Q1: Implement a class called Vehicle.
a) A class named Vehicle
b) Two private data members: brand (string), model (string), price (int).
c) Accessors and Mutators function for brand, value, and price.
Use following main() to test your class.
int main(){
Vehicle a;
a.setBrand("BMW");
a.setModel("X5");
a.setPrice(60000);
cout<><><>



Q2: Continue with Vehicle class:
a) Copy the previous program to a new file.
b) Write Constructor with three parameter, and assign to brand, model, and price.
c) Write default constructor, initialize brand to “TBD”, model to “TBD”, price to 0,
Implement constructor delegation
Use following main() to test your class.
int main(){
Vehicle a,b("Honda","Civic",25000);
cout<><><><><><>



Jun 08, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here