Untitled

mail@pastecode.io avatar
unknown
java
a month ago
705 B
3
Indexable
Never
public class Main {
  public static void main(String[] args) {
   
    System.out.println("Данные машины Lada?");
    System.out.println();
    
    
    Lada lada = new Lada();
    lada.year();
    lada.mileage(); 
    lada.cost();
    
    
    System.out.println("Данные машины Mitsubishi?");
    System.out.println();
    
    Mitsubishi mitsubishi = new Mitsubishi();
    mitsubishi.year();
    mitsubishi.mileage(); 
    mitsubishi.cost();
    
    
    System.out.println("Данные машины Toyota?");
    System.out.println();
    
     Toyota toyota = new Toyota();
    toyota.year();
    toyota.mileage(); 
    toyota.cost();

  }
}
Leave a Comment