@@ -0,0 +1,944 @@
+package com.javarush.task.task25.task2502;%0A%0Aimport java.util.*;%0A%0A/* %0A%D0%9C%D0%B0%D1%88%D0%B8%D0%BD%D1%83 %D0%BD%D0%B0 %D0%A1%D0%A2%D0%9E %D0%BD%D0%B5 %D0%BF%D0%BE%D0%B2%D0%B5%D0%B7%D0%B5%D0%BC!%0A*/%0Apublic class Solution %7B%0A    public static enum Wheel %7B%0A        FRONT_LEFT,%0A        FRONT_RIGHT,%0A        BACK_LEFT,%0A        BACK_RIGHT%0A    %7D%0A%0A    public static class Car %7B%0A        protected List%3CWheel%3E wheels;%0A%0A        public Car() throws Exception %7B%0A            //init wheels here%0A            wheels = new ArrayList%3C%3E();%0A            int wheelCount = 0;%0A            for (String wheel : loadWheelNamesFromDB()) %7B%0A                wheels.add(Wheel.valueOf(wheel));%0A                wheelCount += 1;%0A            %7D%0A            if (wheelCount != 4)%0A                throw new Exception();%0A        %7D%0A%0A        protected String%5B%5D loadWheelNamesFromDB() %7B%0A            //this method returns mock data%0A            return new String%5B%5D%7B%22FRONT_LEFT%22, %22FRONT_RIGHT%22, %22BACK_LEFT%22, %22BACK_RIGHT%22%7D;%0A        %7D%0A    %7D%0A%0A    public static void main(String%5B%5D args) %7B%0A    %7D%0A%7D%0A

Task --> 2502