which class is superclass and subclass?
I need your opinion regarding the relations between those classes, I don't know which class should be the super class and which one is the subclass ..
in this case the Store class has two menues: the first menu is for Item1 class only addnewItem, changePrice. And the other menu has addnewItem, changePrice too in addition CheckOrders for Item 2 class only.
I use addnewItem to add to Item 1 class and same thing to changePrice method just using the message forwarding idea and passing everything to Item1.
and since Item 2 class inherits addnewItem, changePrice from the Item 1 class then it has another method CheckOrders that Item 1 shouldn't have.. (and because item 2 is a subclass it should have more methods than its parent that's why I put it as a child) but how can I check the items in Item 2 class from Store class??? I can't pass it to Item 1 first because it doesn't use this method "I don't know if there is a way to do it ", should I put Item 2 as a parent and Item 1 as a child??
after editing: they are not different menues they are same methods exactly except checkOrders option displayed when the user choose Item2, I mean that the user choose first does he want to perform operations on Item1 or Item2.. if Item1 then the operations are addnewItem and changePrice, and if the choice was Item2 the operations are the same addnewItem and changePrice methods in addition CheckOrders.
here is the diagram to explain what I want