• 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

B&S: booking a contractor.

 
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I have a doubt about booking a contractor.

I thought that when a contractor is locked I must change the owner field of the corresponding record,
and when the contractor is unlocked I must change the owner field to all blanks.

The problem is that I thought that the owner field represents the cookie that identifies the client locking the record. But the assignment says that my application does not interact with these numbers, rather it simply records them.

Also, my assignment says that the size field is the number of workers "available when this record is booked". �does it mean that the size value must decrease every time a contractor is booked?.

I'm confused with this.
Thanks for advanced.
 
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Javier,
The locking and booking operations are seperate. The locking mechanism uses a cookie that you need to create upon a lock, and needs to be returned by the client upon unlock.

The booking of a contractor just assigns the Customer ID to the record. The client will provide the contractor ID. There is no unbooking logic required within my assignment (B&S 2.2.2). Some people have decided to provide it and some not. That is up to you.

I have also not provided any decrementing logic to for the number of contractor workers since any business logic we were to create may be incorrect( who knows how many workers are needed for a job). So I just book the entire record.

Hopefully that helps.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic