Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

B&S question on booking contractor

 
Yan Zhou
Ranch Hand
Posts: 137
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

When booking a contractor, should the customer book all workers working for particular sub-contractor?

Per previous discussion, DB schema suggests this to be true since only one customer ID can be associated with any subcontractor and we cannot change DB schema.

However, the requirement also says that CSR will offer one or more contractors (i.e., workers) to the customer. This suggests that customer may request only some of the workers, while the remaining workers available for another customer.

Any thoughts on how to interpret this?

Yan
 
Yan Zhou
Ranch Hand
Posts: 137
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I thought it over, it won't be a good solution if a customer has to pay for all workers when he only wants one of them.

What I could do is when customer requests some of the workers, I create another record, which is a clone from the existing subcontractor record, then,

1) the new record has the numbere of workers working for the customer and customer ID.
2) that number will then be deducted from the original record.
3) the new record is added and the original record is updated.

Since there is no requirement that subcontractor's name + location has to be unique, that should work.

How does that sound?
Yan
 
Shannon Sims
Ranch Hand
Posts: 197
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
According to the assignment, you can only assign one customer id to a contractor. Therefore, it does not matter how many workers there are working for a contractor. At least that's how I plan on coding my project.
 
Davinder Kohli
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Yan,
I just joined Java Ranch. Before I saw your interpertation of booking a certain # of contractors from a Contractor company, I was going to implement it in the same way. It's good to know that someone else is thinking the same way I am.
So did you decide to stick to this approach? There are others on this message board who think one customer ID per subcontractor, but that does not make any bussiness sense to me.

Thanks.
[ December 25, 2004: Message edited by: Davinder Kohli ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic