Web programming

Units WEB1P and WEB2P

SWS group task 2006-2007s1

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. It must allow store the details of online bank accounts.
  2. The information stored about an account must include the following:
    1. The account number, which must be 8 digits.
    2. The bank sort code, which must be in the format two digits, hyphen, two digits, hyphen, two digits, e.g. 43-27-92.
    3. The name associated with the account, which must be present.
    4. The balance of money currently held in the account.
  3. When a valid transaction is made (using the mechanism implemented in Task A):
    1. The transaction must be verified to ensure that:
      1. the source and destination accounts both exist
      2. the name associated with the destination account in the transaction matches the name associated with the account
      3. there is a sufficient balance in the source account to permit the transaction (assume no overdraft is allowed)
    2. If the transaction fails (due to the above), the user must be notified of the reason.
  4. If the transaction is verified:
    1. the transaction must be stored in a database
    2. the transaction (debiting the amount from the source account and crediting it to the the destination) is performed on the appropriate accounts stored in the same database
    3. the list of the user's transactions (showing all the details listed in 2 above) is then displayed back to them
    4. the updated balances of the source and destination accounts are displayed to the user
  5. The user must be able to request a report showing the details of all accounts held by the system.

Advice

  1. Think carefully about the design of objects to represent the bank accounts. What properties should they have and what type should the properties be? What other operations (methods) should be applicable to a bank account 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

A database schema has been set up for each group as follows:

Group URL Login Password
A jdbc:mysql://kipper.mech.port.ac.uk:3306/groupa groupa groupa
B jdbc:mysql://kipper.mech.port.ac.uk:3306/groupb groupb groupb
 

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.