import java.util.Scanner;
public class Car{

  

  int speedlimit;

  String color;


  public void toString(){

    System.out.println("my car color is : " + color + " and speed limit is : " + speedlimit );

  }

  public void int setSpeedLimit(int speedlimit){

    this.speedlimit = speedlimit;

  }

  public void getSpeedLimit(){

    return speed;

  }

  public void string setColor(String color){

    this.color = color;

  }

  public void getColor(){

    return color;

  }

  

  public static void main(String[] args){

    Scanner input = new Scanner(System.in);

    

    String color;

    int speedlimit;

    color = input.nextString();

    speedlimit = input.nextInt();

    

    setSpeedLimit(speedlimit);

    getSpeedLimit();

    

    setColor(color);

    getColor();

    toString();

  }

}

+ Recent posts