kleon1
Новичок
Добрый день
Решаю тесты. И наткнулся на такую задачу
http://puzzleua.com/z.png - Линк на диаграму
Define the Vehicle interface with an abstract ‘addLuggage’ function that takes a Container as argument.
Define the Car class that initialises an array of luggage upon instantiation.
Define the Sports class with an implementation of the ‘addLuggage’ function that throws an exception if a Suitcase is passed as argument.
Очень нужно. Разобраться
Решаю тесты. И наткнулся на такую задачу
http://puzzleua.com/z.png - Линк на диаграму

Define the Vehicle interface with an abstract ‘addLuggage’ function that takes a Container as argument.
Define the Car class that initialises an array of luggage upon instantiation.
Define the Sports class with an implementation of the ‘addLuggage’ function that throws an exception if a Suitcase is passed as argument.
Очень нужно. Разобраться