0

I am modelling a DVD Rental Store:

  1. A Client gives its clientNumber to the System.
  2. The System checks whenever the given clientNumber is valid.
  3. The Client gives the name of the DVD he wants to rent.
  4. ...
  5. ...I will later have to form an association between a new instance of Rent DVD class concept to the current Client c.

My Domain Model is something like: alt text

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

Glorfindel
  • 21,988
  • 13
  • 81
  • 109
devoured elysium
  • 101,373
  • 131
  • 340
  • 557
  • You can have zero or many DVD Items for one DVD Title? Either you're doing individual inventory item tracking, or your model is a bit baroque already… – Donal Fellows Jun 16 '10 at 10:25
  • I have both individual DVD Title (for example, titanic) and DVD items(for example DVD "titanic" with a unique identifier of 230908239). Which is what you'd expect from a DVD Rental, so you can know which individual DVDs are here and there. – devoured elysium Jun 16 '10 at 12:11

1 Answers1

0

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!).

devoured elysium
  • 101,373
  • 131
  • 340
  • 557