Web programming

Units WEB1P and WEB2P

SWS group task 2008-2009s1

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 the same flight should be rejected.
  5. The user must be able to request a report showing the details of all flights, passengers and bookings held by the system.

Advice

  1. Think carefully about the design of objects to represent the flight, passenger and booking entities. What properties should they have and what type should the properties be? What other operations (methods) should be applicable to each object?
  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.

Database access

Use the built-in Java database to store your data.

 

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.