Some "other" developers have been working on the remote control car project (TODO cross-ref-tba). You have been called in to clean up the code.
Refactor the RemoteControlCar
class to move to separate out telemetry methods and properties.
var car = new RemoteControlCar();
car.Telemetry.Calibrate();
car.Telemetry.SelfTest();
car.Telemetry.ShowSponsor("Walker Industries Inc.");
car.CurrentSponsor
// => "Walker Industries Inc."
car.Telemetry.SetSpeed(100, "cpm");
car.GetSpeed()
// => "100 centimeters per second"
Ensure that the Telemetry
instance cannot be created outside the scope of the car.
Ensure that the Speed
struct cannot be used outside the scope of the RemoteControlCar
class.
Ensure that the SpeedUnits
enum cannot be used outside the scope of the RemoteControlCar
class.