Почему всегда получаю такую ошибку ????
package com.javarush.task.task15.task1503;
/*
ООП - машинки
*/
public class Solution {
public static void main(String[] args) {
new Solution.LuxuriousCar().printlnDesire();
new Solution.CheapCar().printlnDesire();
new Solution.Ferrari().printlnDesire();
new Solution.Lanos().printlnDesire();
}
public static class Ferrari extends LuxuriousCar, Constants {
public void printlnDesire() {
return System.out.println(Constants.WANT_STRING+ Constants.FERRARI_NAME);
//add your code here
}
}
public static class Lanos extends CheapCar, Constants{
public void printlnDesire() {
return System.out.println(Constants.WANT_STRING + Constants.LANOS_NAME);
//add your code here
}
}
public static class LuxuriousCar, Constants {
protected void printlnDesire() {
return System.out.println(Constants.WANT_STRING + Constants.LUXURIOUS_CAR);
//add your code here
}
}
public static class CheapCar, Constants {
protected void printlnDesire() {
return System.out.println(Constants.WANT_STRING+ Constants.CHEAP_CAR);
//add your code here
}
}
public static class Constants {
public static String WANT_STRING = "Я хочу ездить на ";
public static String LUXURIOUS_CAR = "роскошной машине";
public static String CHEAP_CAR = "дешевой машине";
public static String FERRARI_NAME = "Феррари";
public static String LANOS_NAME = "Ланосе";
}
}