Problem Statement:- We want to store the information of different vehicles. Create a class named Vehicle with two data member named mileage and price. Create its two subclasses: *Car with data members to store ownership cost, warranty (by years), seating capacity and fuel type (diesel or petrol). *Bike with data members to store the number of cylinders, number of gears, cooling type(air, liquid or oil), wheel type(alloys or spokes) and fuel tank size(in inches) Make another two subclasses Corolla and Honda of Car, each having a data member to store the model type. Next, make two subclasses Yamaha and TVS, each having a data member to store the make-type. Now, store and print the information of a Corolla and a Honda car (i.e. model type, ownership cost, warranty, seating capacity, fuel type, mileage and price.) Do the same for a Yamaha and a TVS bike.
Problem Statement:- We want to store the information of different vehicles. Create a class named Vehicle with two data member named mileage and price. Create its two subclasses: *Car with data members to store ownership cost, warranty (by years), seating capacity and fuel type (diesel or petrol). *Bike with data members to store the number of cylinders, number of gears, cooling type(air, liquid or oil), wheel type(alloys or spokes) and fuel tank size(in inches) Make another two subclasses Corolla and Honda of Car, each having a data member to store the model type. Next, make two subclasses Yamaha and TVS, each having a data member to store the make-type. Now, store and print the information of a Corolla and a Honda car (i.e. model type, ownership cost, warranty, seating capacity, fuel type, mileage and price.) Do the same for a Yamaha and a TVS bike.
C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter10: Classes And Data Abstraction
Section: Chapter Questions
Problem 12PE: Some of the characteristics of a book are the title, author(s), publisher, ISBN, price, and year of...
Related questions
Question
Cant understand.plz explain all the steps using C++.
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 1 images
Knowledge Booster
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.Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,