![]() |
.. (לתיקייה המכילה) | |
How can we access an attribute or method specific to our implementation if there isn't an appropriate method in the interface? | |
You can assume that no other classes will implement the interfaces, therefore you can downcast to your implementation's type and call your method. This is not type safe, but we allow it in this assignment. |
Should methods in SushiWorld act on the object (SushiLover, SushiPlace) passed to them, or the one in the World that has the same id? | |
You can assume that both will be the same. There will be no cases where we have Alice with id 1, that is registered, and Bob also with id 1 that isn't. |
If a SushiLover has no friends, how do we report that in SushiWorld's toString method? | |
You should return: student's id -> []. |