Menu

[solved]-Use C Programming Given Class Car Create Two Classes Bmw Honda Following Characteristics B Q39078931

Use C++ programming

Given a class Car , create two classes ‘BMW’ and ‘Honda’ withfollowing characteristics

  • BMW class should have private property alloyWheels of integertype.
  • Honda class should have private property normalWheels ofinteger type.
  • Both BMW and Honda are inherited from ‘Car’ class.
  • Both classes should implement setData which will set model, thecolor of super class and wheel count.
  • BMW class should implement “getAlloyWheelCount” to return countof alloyWheels;
  • Honda class should implement “getNormalWheelCount” to returncount of normalWheels;

Input
    BMW1Series5-door Red 4
    i-VTECS1497 Black 6

    where,

  • First line of input is a model, color, alloyWheels of BMWseparated by space.
  • Second line of input is a model, color and normalWheels countof Honda separated by space.

Output
    BMW1Series5-door Red 4
    i-VTECS1497 Black 6

    where,

  • First line is a model, color and alloyWheels count of BMWseparated by space.
  • Second line is a model, color and normalWheels count of Hondaseparated by space.

Assume:

  • Wheel counts for both cars are integers within the range [1 to20].

Expert Answer


Answer to Use C++ programming Given a class Car , create two classes ‘BMW’ and ‘Honda’ with following characteristics BMW class sh… . . .

OR


Leave a Reply

Your email address will not be published. Required fields are marked *