Web programming

Units WEB1P and WEB2P

SWS group task 2009-2010s1

GroupIndividual 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 store the details of online bank accounts in a database.
  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 the 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. For each account, the report should show all transactions on the account since a specified date. The user interface must permit the user to select this date, which must be in the past.
  6. The user must be able to request interest to be paid on all accounts. Interest should be treated as a transaction that adds a specified percentage (e.g. 1%) of the balance to an account, while deducting the same amount from a central account (which is ignored for interest crediting purposes).

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.
  3. Use of the Java Persistence API is strongly recommended.
  4. Use of Java DB or MySQL is recommended for the database.

Constraints

The same constraints on your solution apply as for Task A plus:

 

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.