Closed prerthan99 closed 3 years ago
Thanks for sharing!
edit: see https://github.com/nus-cs2103-AY2021S2/forum/issues/352#issue-865050502, there is a video in week 8 or 9 that goes through the design process for this exact question
To add, it's not possible to show visibility for associations shown as lines (within the scope of notations we cover in the module). Visibility is not that important anyway (compared to showing relationships between classes). Option 1 is still more useful than option 2 as a visual model of the design even if it doesn't show visibility.
i was wondering if the arrow linking Box and lid should be bidirectional eg: lid 0..1 <------------------------> box 0..1? thank you
@prerthan99
ah ok. thank you.
given the question below, are the 2 diagrams correct and equivalent? If so, how can we show visibility (private, public, static) in the first option. and also, how do we show that the expected output type for open is void? Is it open() = void ?
Question:
Ans: