CSCI.4220 Network Programming
Spring, 2005
Makeup assignment

This can be used to replace a missing or low test or project grade (except the May 2 Exam)

For this assignment, you are to write and deploy a JSP which uses one or more javabeans. It will be a simulation of a hotel finding site. The user will enter several pieces of information, and the bean will recommend a hotel.

Here is the information which the user should enter.

Max price
Neighborhood

Once the user enters this information, the jsp should reply to the client with a hotel name, phone number, and rate.

The client then has the option of booking a room in that hotel. The only information which the client should have to enter is the arrival date and the number of nights that he/she is staying.

This should go to a different jsp, which also uses a bean. The reply to this is a message that the reservation is confirmed, and the cost. The latter figure is the cost per night times the number of nights.

You need to write the following: Each should be a separate file.

  1. an initial html file which has a form asking the user to enter the the max price and the neighborhood.
  2. a jsp file which receives the information from the client, passes it on to a bean, gets the information from the bean, and returns it to the client in an html file. Note that this html file will have to contain a form to gather reservation information.
  3. a javabean which looks up a hotel based on the information provided by the client
  4. a second jsp which gets information about the room reservation. This jsp calls a second bean which confirms the reservation (reservations are always confirmed), and calculates the price. It then sends information back to the client in the form of an html page, displaying information about the reservation, including the name of the hotel, the arrival date, the number of nights and the cost.

Your html pages do not need to be glitzy, but they should have more than just the basic information.

Here is the raw data. There are only three neighborhoods, Lansingburgh, South Troy, and Sycaway. There are only two hotels in each of the three neighborhoods. Here are the hotels and their cost per night.

Neighborhood Hotel Phone Number Cost per night
Lansingburg Lansingburgh Hilton 518-345-6789 $135
  The Ambassador 518-543-8765 $85
South Troy The Plaza 518-542-2222 $220
  The Holiday Inn 518-677-7272 $95
Sycaway DaysInn 518-123-4321 $75
  The Ritz 518-325-0087 $135

If the user enters a max price less than the price of any hotel in their requested neighborhood, return a ``No Hotel Found'' message. If the max is greater than the price of the less expensive hotel but less than that of the more expensive hotel, return the name and phone number of the less expensive hotel. If the max is greater than or equal to the more expensive hotel, return the name and phone number of the more expensive hotel.

This project is due on Friday May 6.