Using C Create Car Instrument Simulator Car Instrument Simulator Create Following Classes Q37233540

(Using C++ create a Car Instrument Simulator)

Car Instrument Simulator

Create the following classes: Car, Odometer, FuelGauge.

The Car class allows for the instantiation of a Car object.

The Car object will contain (via composition) an Odometerobject, and a FuelGauge object.

The Car object will also include “make”, “model”, and “color” asstring properties (instance variables).

In the Car constructor method, you will create a FuelGaugeobject, passing 15 as an argument into the FuelGauge constructorindicating the number of gallons.

In the Car constructor method, you will create an Odometerobject, passing 0 and the address of the FuelGauge object asarguments to the Odometer constructor, indicating the number ofmiles driven

OR
OR

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.