Create a class named Vehicle. 1. Private data member: brand — dynamic member string 2. Default constructor — set brand to “TBD” 3. One argument constructor to set brand 4. Output function — print brand of Vehicle 5. Mutator and accessor function for brand Use following main() to test your function.

Programming with Microsoft Visual Basic 2017
8th Edition
ISBN:9781337102124
Author:Diane Zak
Publisher:Diane Zak
Chapter10: Classes And Objects
Section: Chapter Questions
Problem 2RQ
icon
Related questions
Question
100%

Create a class named Vehicle.
1. Private data member: brand — dynamic member string
2. Default constructor — set brand to “TBD”
3. One argument constructor to set brand
4. Output function — print brand of Vehicle
5. Mutator and accessor function for brand

Use following main() to test your function.
int main(){
Vehicle a,b("BMW");
a.output(); // Brand:TBD
b.output(); // Brand:BMW
a.setBrand("Tesla");
cout<<a.getBrand()<<endl; // Tesla
}

Expert Solution
steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Knowledge Booster
Class
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Programming with Microsoft Visual Basic 2017
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT