Web programming

Units WEB1P and WEB2P

SWS group task 2011-2012s1

Group task (Task B)

Your task (as a group) is to extend the functionality of the web application you developed in Task A as follows:

  1. The application must allow persistent storage of valid airline bookings in a database.
  2. A booking identifies a flight and a passenger.
  3. For the purposes of this exercise:
    1. two flights are identical if they have the same flight number and date
    2. two passengers are identical if they have the same lastname, forename and postcode
  4. Each flight has a maximum number of passengers (which must be stored in the flight details). Once that number has been reached, further bookings for that flight should be rejected.
  5. A sample set of flights should be created at application start-up. A booking is valid only if it refers to an existing flight.
  6. The user must be able to request reports showing the details held by the system, as follows:
    1. all flights between two specified dates (inclusive), showing the names of the passengers booked on that flight, the maximum number of passengers permitted on that flight, and the number of bookings thus remaining available
    2. all passengers, showing the bookings that each has made
    3. all bookings, showing flight and passengers, ordered chronologically (most recent first)
  7. The user must be able to "cancel" a booking shown in any of the reports. Cancelling a booking will free a slot for someone else to book on that flight.

Advice

  1. Think carefully about the design of objects to represent the entities. What properties should they have and what type should the properties be? What other operations (methods) should be applicable to each entity?
  2. The Model-View-Controller (MVC) pattern is a good way of structuring a web application. Think carefully about how you can structure your code to achieve this separation.

Constraints

The same constraints on your solution apply as for Task A.

 

Last updated by Prof Jim Briggs of the School of Computing at the University of Portsmouth

 
The web programming units include some material that was formerly part of the WPRMP, WECPP, WPSSM and WEMAM units.