iam new here, my english is not the best, but i hope you understand my question and maybe can help me. I made a little project:
Interface: vehicle
Abstract Class: vehicleImpl implements vehicle
Interface: train extends vehicle
Class: trainImpl extends vehicleImpl implements train
Interface: waggon extends vehicle
Class: waggonImpl extends vehicleImpl implements waggon
Class: trainConnection (can have multiple waggons and minimum one train)
Then there is an object which is subclass from train and waggon -> a "trainwaggon".
Interface: trainwaggon extends train, waggon
class: trainwaggonImpl extends trainImpl implements trainwaggon (i added the variables from waggon manually, because i can't use two times super(...) for both superclasses)
i also have an class location and connection (like a graph), but these dont matter now. At last, the class "administration" has maximum one instance and is managing the trainconnections.
Is that design pattern legit? Or would you recommend to change it?
Thank you for you help. -Rabe