• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Utility International - mistake in domain model?

 
Ranch Hand
Posts: 55
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello!
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.
There are:


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]
 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Antoni Mysliborski
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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..
 
Ranch Hand
Posts: 211
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.

My SCEA experience:http://javalogue.blogspot.com/

HTH
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic