пол дня голову ломаю, не могу понять посему текст не выводится на экран
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{
public void printlnDesire() {
System.out.println(Constants.WANTS_TRING + Constants.FERRARI_NAME);
}
}
public static class Lanos extends CheapCar{
public void printlnDesire() {
System.out.println(Constants.WANTS_TRING + Constants.LANOS_NAME );//add your code here
}
}
public static class LuxuriousCar {
protected void printlnDesire() {
System.out.println(Constants.WANTS_TRING + Constants.LUXURIOUS_CAR);
}
}
public static class CheapCar {
void printlnDesire() {
System.out.println(Constants.WANTS_TRING + Constants.CHEAP_CAR );
}
}
public static class Constants {
public static String WANTS_TRING = "Я хочу ездить на ";
public static String LUXURIOUS_CAR = "роскошной машине";
public static String CHEAP_CAR = "дешевой машине";
public static String FERRARI_NAME = "Феррари";
public static String LANOS_NAME = "Ланосе";
}
}