• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

What is the relationship between Request and Bid?

 
Jufeng Dou
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When design the class diagram.
Bids is for a request.

I think it should be composition. because bids belong to a request.
When a request is destroyed, the bids also needs to be destroyed.
Bid's life cycle is maintained by Request.

But, Composition also include a mean that indicates the relationship of Whole/Part.
But the Request and Bid seems not a Whole/Part relationship. Whatever a request whether has bids, it is a Whole Request.

If I use a Association between them,I can not show the life cycle relationship.

Which one should be the decision?
 
David Secura
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

The difference is very straight, that when we want things from others in a decent way, it's a request. But when we offer price for anything it's a bid. There is not much difference between these two terms.


DKS
 
David Secura
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

The difference is very straight, that when we want things from others in a decent way, it's a request. But when we offer price for anything it's a bid. There is not much difference between these two terms.


DKS
 
Scott Soo
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Jufeng Dou:
When design the class diagram.
Bids is for a request.

I think it should be composition. because bids belong to a request.
When a request is destroyed, the bids also needs to be destroyed.
Bid's life cycle is maintained by Request.

But, Composition also include a mean that indicates the relationship of Whole/Part.
But the Request and Bid seems not a Whole/Part relationship. Whatever a request whether has bids, it is a Whole Request.

If I use a Association between them,I can not show the life cycle relationship.

Which one should be the decision?


Hi,

Just an idea for you. Is it possible for a request to exist without a bid in the end?
 
Ashwin Pai
Ranch Hand
Posts: 90
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Jufeng Dou:
When design the class diagram.
Bids is for a request.

I think it should be composition. because bids belong to a request.
When a request is destroyed, the bids also needs to be destroyed.
Bid's life cycle is maintained by Request.

But, Composition also include a mean that indicates the relationship of Whole/Part.
But the Request and Bid seems not a Whole/Part relationship. Whatever a request whether has bids, it is a Whole Request.

If I use a Association between them,I can not show the life cycle relationship.

Which one should be the decision?


Couple of Thoughts
1. Could Request be an association class between Part & Bid ? Ultimately you are bidding on a Part -- ie if instance of Part & Bid exisits, Request has to exist.

2. Since the "part of" test does not work its probably not a composisition(from a business object perspective).
As Scott hints apart from the "part of" test & "life-cycle" management responsibility, "the whole cannot exist without a part" (like a Building cannot exisit without Room) should also be satisfied.

HTH
Ashwin
Also how would the developmewnt of these classes be different if you opt either of these relations ?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic