0% found this document useful (0 votes)
10 views2 pages

Lab 3

Uploaded by

Tu Hong Cam
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views2 pages

Lab 3

Uploaded by

Tu Hong Cam
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Practice Assignment 3

Problem 1. (100%) MVC design pattern


Scenario: Your task is to implement an Online Banking System. Overall, the system
aims to provide user-friendly, and efficient online banking experience for its users,
allowing them to manage their accounts and perform financial transactions with
ease.

1. Design system model (30%)


User Account Transaction
Represents a bank user Represents a bank account Represents transactions
associated with a user detail
username String accountNumber TransType description
password double balance double amount
User owner
AccountType accountType
*AccountType enum defines different types of accounts: SAVINGS, CHECKING,
LOAN;
* TransType enum defines different types of transaction: DEPOSIT,
WITHDRAWAL;
a. Create User, Account, and Transaction as described above. (10%)
b. Prepare a list of registered Account their corresponding User (reserved for
controller). You can use an in-memory collection (like an ArrayList) or
connect to a database (like SQLite) for persistence. (20%)
2. Create View (30%)
Handles user authentication and displays information,
a. Implement “authenticateUser”, which prints out their account’s info if they
successfully signed in. (10%)
b. Implement “printTransaction” to prints out the type of transaction, the
amount of transaction. (10%)
c. Implement “printAccountDetails” method to print out Account
information. (10%)
3. Create Controller (40%)
a. Implement “authenticateUser” method to authenticate user (Based on the
list of registered accounts). (10%)
b. Implement “deposit” method to add a sum of money in account. This
transaction is free for all accounts but “LOAN” which will be deny of
request. (10%)
c. Implement “withdraw” method to subtract an amount from account. This
transaction is free for “CHECKING” account type, the rest will be denied of
service. (10%)
d. Implement “transacitionLog” method to request viewing transaction
history. (10%)

~The end~
Your project/ solution should be submitted to Moodle before the
deadline.

You might also like