Elon's Toys

in #italast month

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; 
  }   
}

}

Sort:  

Thank you, friend!
I'm @steem.history, who is steem witness.
Thank you for witnessvoting for me.
image.png
please click it!
image.png
(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.

Coin Marketplace

STEEM 0.30
TRX 0.12
JST 0.032
BTC 61660.23
ETH 3056.45
USDT 1.00
SBD 3.82