package vehiculos;
import java.util.Scanner;
public class carro implements vehiculo {
Scanner entrada = new Scanner(System.in);
@Override
public String encender(){
return "encendiendo el carro";
}
@Override
public String acelerar() {
return "acelerando el carro";
}
@Override
public String frenar() {
return "frenando el carro";
}
@Override
public String apagar() {
return "apagando el carro";
}
@Override
public String modelo(){
String modelo = entrada.nextLine();
return modelo;
}
@Override
public int anio(){
int anio = entrada.nextInt();
return anio;
}
}
Be the first to comment
You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.