Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please consider the requirements below and create a UML class diagram for your banking application. The diagram should contain key instance fields and methods. A

image text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribed

Please consider the requirements below and create a UML class diagram for your banking application. The diagram should contain key instance fields and methods. A customer can request the bank to open a new account. Once the account is open, the customer can deposit money into the account, withdraw money from the account and see the account balance. There are two types of accounts: checking accounts and saving accounts. These accounts are similar in nature except that the checking account allows the customer to withdraw more than the account balance, effectively allowing a negative balance. The negative balance limit is called an overdraft limit, which can be set when the account is opened. The customer can also print a statement of an account, listing all transactions. There are two types of transactions: the debit transaction represents a withdrawal from the account, and the credit transaction represents a deposit to the account. An account balance is calculated by adding up all credit transactions and then subtracting from the sum, all debit transactions. The customer can also close the account. Once the account has been closed, the following rules apply: - If an account has a positive balance, then deposits are not allowed but withdrawals can be made until the account balance has reached zero - If an account has a negative balance, withdrawals are not allowed, but deposits can be made as long the account balance stays at zero or below public boolean withdraw(int accountNumber, amount) \{ 1 - Find account 2 - If account not found then return false 3 - If account found then deposit money and return the result of the withdraw method 3 public boolean closeAccount(int accountNumber) \{ 1 - Find account 2 - If account not found then return false 3 - If account found then close account and return true \} /

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Principles Of Database Systems With Internet And Java Applications

Authors: Greg Riccardi

1st Edition

020161247X, 978-0201612479

Students also viewed these Databases questions

Question

Question Can a self-employed person adopt a profit sharing plan?

Answered: 1 week ago