wood burning stoves 2.0*
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes B&S question on booking contractor Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "B&S question on booking contractor" Watch "B&S question on booking contractor" New topic
Author

B&S question on booking contractor

Yan Zhou
Ranch Hand

Joined: Sep 02, 2003
Posts: 137
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

Joined: Sep 02, 2003
Posts: 137
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

Joined: Jul 03, 2003
Posts: 197
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

Joined: Dec 25, 2004
Posts: 17
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 ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: B&S question on booking contractor