package vehiculos;
import java.util.Scanner;
public class motocicleta implements vehiculo {
Scanner entrada = new Scanner(System.in);
@Override
public String encender(){
return "Encendiendo motocicleta";
}
@Override
public String acelerar() {
return "Acelerando motocicleta";
}
@Override
public String frenar() {
return "Frenando motocicleta";
}
@Override
public String apagar() {
return "Apagando motocicleta";
}
@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.