I am modelling a DVD Rental Store:
- A
Clientgives itsclientNumberto theSystem. - The
Systemchecks whenever the givenclientNumberis valid. - The
Clientgives the name of theDVDhe wants to rent. - …
- …I will later have to form an association between a new instance of
Rent DVDclass concept to the currentClient c.
My Domain Model is something like:
I’ve made the Contract for the first and second operations as:
Preconditions: none
Postconditions: there exists a Client c such that c.clientNumber = clientNumber.
Now, I don’t know if I should form an association between this Client c and the DVDStore(that I intend to use as front-end). If I don’t make the association, how will I later be able to “reference” this same Client? Should I be making an association between Client and a different concept?
Thanks
Yes, one has to create an association between Client and DVDStore. Otherwise (as stated), you can’t later refer to the same Client (at least without having to search for it… again!).