• 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

UrlyBird : question about the owner

 
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi

It is indicated in my assignment (UrlyBird) when describing the field �owner�:

�The id value (an 8 digit number) of the customer who has booked this. Note that for this application, you should assume that customers and CSRs know their customer ids. The system you are writing does not interact with these numbers, rather it simply records them. If this field is all blanks, the record is available for sale�

In my implementation the owner is set to blanks automatically if �date� is
today or before today. The room can be booked if date is today, tomorrow or after tomorrow.

Do I fit with the exam spec?
 
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Mike,

Why are you setting the owner value "automatically" based on the date value?

>> In my implementation the owner is set to blanks automatically if �date�
>> is today or before today. The room can be booked if date is today,
>> tomorrow or after tomorrow.

The only scenarios when I updated the owner field were:
- on a 'book' operation, setting it to the Customer ID.
- on an 'unbook' operation, setting it to blanks.

Note that on a create operation, the invoker is passing in all values including the customer.
 
Mike Tilling
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Cindi,

On a create operation, I choose to provide all values except the customer, I suppose that the newly created record is for future booking purpose.

I am worried about this spec "If this field (owner) is all blanks, the record is available for sale", I managed to set it to blanks if the record becomes ready for booking (date field is today or before today)

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



I am close to submit, I want to review the way I implemented the booking method:

I do have these requirements :

-"They take bookings only within 48 hours of the start of room occupancy"

-The field owner (customer) is described as follows "If this field is all blanks, the record is available for sale"

- date field has the following description : "Date available : The single night to which this record relates, format is yyyy/mm/dd."

1- which parameters do you provide when booking the room?

I povide the booking date and the duration (which the number of nights the room is booked for) - the date field will be the booking date increased by the duration. I wonder if I am providing more parameters than required?

2- I am getting confused about the role of the owner and date fields, In my implementation the booking request is accepted If (date is today and owner is empty) or (date is tomorrow and owner is empty) or (date is after tomorrow and owner is empty). am I wrong?

3- If available date is yesterday and owner is not empty, do we allow the room to be booked? (it is available but owner is not empty!)

5- If date is after today +48 hours and the owner is empty, do we allow the room to be booked. (it is beyond the scope of 48 hours but not affected to any one!)

Regards
 
Everybody's invited. Except this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic