using System;
class RemoteControlCar
{
private int meters=0; // default wäre auch 0
private int percentage=100;
public RemoteControlCar()
{
}
public RemoteControlCar(int meters, int percentage)
{
this.meters = meters;
this.percentage = percentage;
}
public static RemoteControlCar Buy()
{
RemoteControlCar car1 = new RemoteControlCar();
return car1;
}
public string DistanceDisplay()
{
return "Driven " +meters+ " meters";
}
public string BatteryDisplay()
{
if(percentage==0)
return "Battery empty";
else return "Battery at " + percentage+ "%";
}
public void Drive()
{
if(percentage!=0)
{
percentage -= 1;
meters+=20;
}
}
}
Thank you, friend!
I'm @steem.history, who is steem witness.
Thank you for witnessvoting for me.
please click it!
(Go to https://steemit.com/~witnesses and type fbslo at the bottom of the page)
The weight is reduced because of the lack of Voting Power. If you vote for me as a witness, you can get my little vote.
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit