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.

Programming Logic & Design Comprehensive
9th Edition
ISBN:9781337669405
Author:FARRELL
Publisher:FARRELL
Chapter11: More Object-oriented Programming Concepts
Section: Chapter Questions
Problem 6PE
icon
Related questions
Question
Cant understand.plz explain all the steps using C++.
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.
Transcribed Image Text: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.
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Knowledge Booster
ADT and 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 Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
Programming with Microsoft Visual Basic 2017
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning