This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
When you book one hotel room, or one record, you need to replace that record's last column value from blank to certain customer ID. According to the instruction, "The system you are writing does not interact with these numbers, rather it simply records them", so my solution is: 1) create a sample customer ID arry which contains something like"12345678", or "23456789", etc. 2) when doing booking, randomly select one ID from that ID array.
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.
I don't know if auto generating this number is going to subtract from the overall score, however, better safe than sorry.
Joined: Aug 18, 2005
Maybe my understanding of the instruction is wrong. I am still confused here. How do you update one record when booking it for some customer? What value you will put there?
But why the instruction says no interaction with such numbers? How to understand that? It is easy to provide a simple input dialog for CSRs to enter such values, does that violate that interaction rule? Thanks.
author and jackaroo