Hi, I am a java programmer. In a recent telephone interview I was asked how I would go about designing a Restaurant Reservation System? The time to answer would be anywhere between 10 to 15 minutes. Any suggestions on how to answer this question?
This sounds an awful lot like the SCJD exam. You may want to start with the thread on that, and possibly read Max Habibi's Java Developer Exam book. A short answer would be to provide a GUI accessible over an Internet or intranet connection (depending on the structure of the system and the user requirements), record-locking to prevent multiple-user access of records (which could corrupt your database), etc. We also have lots of threads here on the individual topics involved, such as sockets, Swing/GUI, Threading, etc.
Give a man a fish, he'll eat for one day. Teach a man to fish, he'll drink all your beer.
Cheers, Jeff (SCJP 1.4, SCJD in progress, if you can call that progress...)
Originally posted by amysore radha: Hi, I am a java programmer. In a recent telephone interview I was asked how I would go about designing a Restaurant Reservation System? The time to answer would be anywhere between 10 to 15 minutes. Any suggestions on how to answer this question?
If this is an interview, there should be no clear answer. The interviewer just wants to know how you think. Just work through the problem out loud. Consider the data types that you need, the type of modifications that you need accomplish, and how to store them. Consider the type of type of operations you need to accomplish, etc. Slowly bringing everything together.
Just make sure you let the interviewer understand what and how you are thinking through the problem.
I think this question is about thread programming using Wait and Notify methods.
In a restaurant, there might be many (threads) waiting to get a table. But how do you manage this situation. How does all the other threads wait until they get notified that the table is free to occupy?
You're all thinking about technical implementation details. Design is more high level than that. What business processes are involved? What are the requirements of the system (on what hardware will it run, will we want a web application or a thick client for example)? Is it to be multi-user or not? Do we want a client-server solution or is a standalone application sufficient?
Only when all that is decided can you begin to map out the technical stuff and that at a high level.
Will we use Java or is another language more appropriate (maybe Delphi if it's to run solely on Windows machines as a client-server application)?
Determine program flow. What steps will the user take through the program when doing each of the tasks the program needs to perform (which would have been mapped out earlier)?
From that draw rough sketches of the user interface for each of those steps, those will be the first view the user gets of what their new app will look like and for you a handhold in creating the screens.
Only after all that is done can you get down to determining a class hierarchy and thinking of technical aspects like threading and database design.
Them asking for a restaurant reservation system is just a handhold to get you talking, what they were really after was trying to determine a) whether you can describe the steps in software design and b) whether you can express yourself.