Question: c++ Create a class called Skateboard). Add two member variables color and size). Add only getter functions. Implement a constructor that expects values for both
Create a class called Skateboard). Add two member variables color and size). Add only getter functions. Implement a constructor that expects values for both variables and assigns them. Create a class Motor with a single member variable named speed. Add a getter function and a constructor that expects a value for speed and assigns it. Create a subclass of Skateboard named ElectronicSkateboards. The class uses composition by having a single instance of Motor. Add a constructor which expects color size and an motor object. Pass color and size to the base constructor and set motor to its member variable
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
