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:
- It must allow store the details of online bank accounts.
- 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 a 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.
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.
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 |