• 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
  • Tim Cooke
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

About URLBirld booking!

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The database defined by the assignment gives me seven fields:
Hotel name, location, size,smoking,rate,date,owner
The assignment explained that "size" means maxinum number of people
permitted in the room.
So,my question is when the customer booking the room,does he need to
define the size.
That's is to say, the customer only want to book the part of the room's bed.
Is it possible to distribute a room to serval people who don't know each other?
"size" is so ambiguous!
Could anyone give me a explanation?
Thanks a lot!
 
Ranch Hand
Posts: 619
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Peng,
I think you need only be concerned about the name and location fields for searching purposes, and the owner field for booking purposes. The other fields (size, smoking, rate, and date) are there but you don't really have to do anything with them (except for displaying them to the user in the JTable). I didn't have your assignment so maybe someone who did can confirm this.
 
Ranch Hand
Posts: 160
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi
I did UrlyBird. I separate in my justifications, two kinds of requirements, Business and System. The System's requirements are what you must implement. What you mention is relating to the Business requirement. That you can assume the CSR to handle and nothing to do with the implementation. Thing like a customer book a room of 4 and 5 check in, etc. The validation of 48 hours can be classified under business requirement. Then one strange thing is there is one who failed the whole assignment without implementing the 48 hours requirement. I didn't implement this and I carefully document it in my Choices.txt. I passed recently.
My GUI allow search on the Hotel, Location and plus Date for your information. George mentioned earlier his have hotel and location.
Best Regards
[ February 25, 2004: Message edited by: Frankie Cha ]
 
George Marinkovich
Ranch Hand
Posts: 619
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Frankie,

Originally posted by Frankie Cha:
My GUI allow search on the Hotel, Location and plus Date for your information. George mentioned earlier his have hotel and location.


You're right, I missed date.
It would be a pretty poor hotel reservation system if it didn't include date.
 
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
However, in my assignment outline (it's URLyBird 1.3.2) it says in the User Interface section:

It must allow the user to search the data for all records, or for records where the name and/or location fields exactly match values specified by the user.


I assume from this that I only need to be able to do field specific searches for these two fields and that's it (i.e. name and location - nothing else)? So providing a facility to search the date is "work beyond the requirements of the specification"?
One question I do have is regarding the find method. Here's what it says in the spec:

How are people doing field specific searches using the String array? I can understand that using an array would be good just to send words (strings) and then just search x field(s) using these words. But if I wanted to search the name field and only the name field using the find method how would I specify that? I'm sure the array is meant to only store search terms? One way would be to have each array item look something like:
name:joe's Hotel
name:The white swan
location: New York
and then spilt the value into two strings using : (or whatever seperator). Maybe this doesn't matter? I'd be interested to hear what other people are doing?
Stephen
 
George Marinkovich
Ranch Hand
Posts: 619
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Stephen,
You're right, only the name and location fields are required to be searchable. So I was right the first time, and shouldn't have corrected myself. Now I'm doubly embarrassed.
The purpose of the search IMO is to limit the number of records you have to look at (not necessaryily to narrow it down to a single record). So it's appropriate that the search narrow the records down to a particular hotel name or location (or both), and then the user can pick from those displayed the record that has the date of interest to him.

Originally posted by Ste Graham:
How are people doing field specific searches using the String array? I can understand that using an array would be good just to send words (strings) and then just search x field(s) using these words. But if I wanted to search the name field and only the name field using the find method how would I specify that?


To search for a name:
String[] criteria = {"Dogs With Tools", null, null, null, null, null};
To search for a location:
String[] criteria = {null, "Hobbitton", null, null, null, null};
To search for both name and location:
String[] criteria = {"Dogs With Tools", "Hobbitton", null, null, null, null};
 
Ste Graham
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
George - thanks very much for the prompt reply. I like the search model you outlined! I just hadn't looked at it like that. Ta!
Stephen
 
Xie Ruchang
Ranch Hand
Posts: 160
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Stephen
I think we should not interpret that the "musts" specify in the assignment as mandatory AND exclusive.

It must allow the user to search the data for all records, or for records where the name and/or location fields exactly match values specified by the user.


If you take the interpretation as you posted, then there is no room for wild card search as the above statement says exactly. The specification does allow room for reasonable interpretation. It must allow the user to search the data for all records or... It doesn't say how, I determine the how by wildcard for hotel, location and date. This is still within the specification.
If you look closely at the API which you quoted


// Returns an array of record numbers that match the specified
// criteria.
// Field n in the database file is described by criteria[n].
// A null value in criteria[n] matches any field
// value. A non-null value in criteria[n] matches any field
// value that begins with criteria[n]. (For example, "Fred"
// matches "Fred" or "Freddy".)
public int [] find(String [] criteria)


It does allow room to search for ALL fields in the database, not only the hotel, location and date, but also the rest of the fields. Having said that, we have to justify why we want to do it. That is another issue altogether and the Examiner will see why we chose a particular approach.
George, think you are right the second time.
Best Regards
 
George Marinkovich
Ranch Hand
Posts: 619
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Frankie,
The best thing about saying two totally opposite things is that you're guaranteed to be right 50% of the time.

Originally posted by Frankie Cha:
George, think you are right the second time.


I agree with you.
 
peng qingtao
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Seeing the words all of you,i am more clear about the concerpt.
Another question is ,When the customer takes a booking,
does he need to input his id value?
And after room is booked,how do i handle this record in the UI.
i think there are two choices:
the first,delete the record from the JTable
the second,make the record in the JTable with a flag
 
Xie Ruchang
Ranch Hand
Posts: 160
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Third put the customer id in the JTable!
 
reply
    Bookmark Topic Watch Topic
  • New Topic