Web programming

Units WEB1P and WEB2P

Pre-SWS task 2006-2007s1

Preparation task (Task A)

Your task is to implement a web application that has the following functionality:

  1. It must allow the user to specify the details of an online banking transaction.
  2. The information entered about a transaction must include the following:
    1. The source account number from which the amount is to be paid, which must be present and be an 8-digit number.
    2. The destination account number to which the amount is to be paid, which must be present and be an 8-digit number.
    3. The bank sort code for the source account. This must be in the format two digits, hyphen, two digits, hyphen, two digits, e.g. 43-27-92.
    4. The bank sort code for the destination account. This must be in the format two digits, hyphen, two digits, hyphen, two digits, e.g. 43-27-92.
    5. The name associated with the destination account, which must be present.
    6. The amount of money to be transferred as a number containing at least one digit before the mandatory decimal point, followed by exactly two digits.
  3. If the user enters a valid transaction, it is added to a list of transactions stored as a session variable. The list of a user's transactions (showing all the above details) is then displayed back to them.
  4. If the user enters an invalid transaction, the system indicates to the user where invalid data has been entered and provides them with an opportunity to correct it.

Validation of transactions (where possible) is to be done both at the client and at the server side.

The code you produce will form the basis for further development work on the day of the SWS. You will need to hand in the code you write for this exercise as part of the individual assessment of the SWS.

You may either:

Notes

You should develop your code using HTML, JavaScript, Java servlets and JSPs as appropriate.

The code written should be of "good quality", viz. exhibit good layout and readability, and possess good structure (using classes, packages and inheritance where appropriate). The reuse of existing code is encouraged, but must be acknowledged.

Constraints

Resources

The webapp1 web application contains example code that you may find useful in this assessment.

You may find it useful to use some of the Java Collections Framework classes (java.util.*).

Deliverables

  1. There is no formal deliverable for this task, however you will need to bring an electronic version of your work along to the SWS.
 

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.