I hope this post does not violate the rules of the forum, if so, please delete/modify it.
I'm working on assignment "Utility International", and in domain model I found such strange relations that I cannot find any sense in it.
That creates awkward situation - one customer can have only one payment, but many bills to pay (than what should be the meaning of Payment class in such case?), Bill is associated with only one customer, but can have many payments (???, why should? and from where coming, if customer has only one payment?)
I believe this part of BDM should look like this:
Now it is quite logical (relation 1-* between payment and bill is justifiable as there are different types of bills to be paid in one month, so it's easy to imagine that customer pays them all in one bulk).
Do you think I can safely make such change to BDM? Or maybe someone can find any logical explanation to the original BDM, which wouldn't require any changes. I don't want to change it to simplify anything, nor even to optimize, but I just cannot understand how this original BDM can work - I believe it's either a typo, or they are testing our awareness ;)
[Edit: put text between [code] and [/code] ubb code blocks]
My understanding regarding the relationships between Customer-MonthlyBill and Payment-MonthlyBill is clear.
1) A Customer can have multiple MonthlyBills so there is a 1--* relationship between Customer and MonthlyBill.
2) There can be one payment for multiple MonthlyBills and several payments for only one MonthlyBill so there is a *--* relationship between Payment and MonthlyBill.
The only thing which is confusing me is the relationship between Customer and Payment which has a 1--1 relationship. Can someone please clarify this?
I hope I am not giving out too many details, if so please delete it.
Joined: May 13, 2011
This is exactly the conclusion to which I came after some thoughts - that many payments to one bill are possible (although I don't think they are really common in practice, esp. with payment by credit card).
But 1-1 relation between Payment and Customer still doesn't make any sense at all..
You might want to keep in mind that requirements or information provided by business experts is far from perfect - even in the real world.
The exam allows you to make assumptions, as long as you make reasonable and valid assumptions, you can change the domain model to reflect what you think is right. I did that for my assignment quite significantly and i passed.