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:
- It must store the details of online bank accounts in a database.
- The information stored about an account must include the following:
- The account number, which must be 8 digits.
- The bank sort code, which must be in the format two digits, hyphen, two digits, hyphen, two digits, e.g. 43-27-92.
- The name associated with the account, which must be present.
- The balance of money currently held in the account.
- When a valid transaction is made (using the mechanism implemented in Task A):
- The transaction must be verified to ensure that:
- the source and destination accounts both exist
- the name associated with the destination account in the transaction matches the name associated with the account
- there is a sufficient balance in the source account to permit the transaction (assume no overdraft is allowed)
- If the transaction fails (due to the above), the user must be notified of the reason.
- If the transaction is verified:
- the transaction must be stored in the database
- 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
- the list of the user's transactions (showing all the details listed in 2 above) is then displayed back to them
- the updated balances of the source and destination accounts are displayed to the user
- 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.
- 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
- 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?
- 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.
- Use of the Java Persistence API is strongly recommended.
- Use of Java DB or MySQL is recommended for the database.
Constraints
The same constraints on your solution apply as for Task A plus:
- Your submitted work must conform to the specification for assessed web applications.
- You must provide an SQL script that can be used to create a database schema for your application, and the schema must conform to the naming convention stipulated in the specification.
- If your database must be initialised with some data, you must provide an SQL script or program to populate it.