-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProject Spec
More file actions
48 lines (34 loc) · 3.01 KB
/
Copy pathProject Spec
File metadata and controls
48 lines (34 loc) · 3.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
Object-Oriented Design and Implementation Project
Design and implement a set of classes for a bank according to the following requirements.
The bank has four types of accounts as shown in the table.
All accounts have the following information that need to be recorded: name (either a business corporation name or person name),
account number (a unique integer between 10000 to 99999), address, email address, phone, and current balance.
The following table shows how to process transactions for different accounts.
Account Type, | Deposit Fee, | Withdrawal Fee, | Monthly Fee, | Monthly Interest
-------------------|---------------|----------------------------|--------------------|-------------------
Business Checking, | No fee, | "No fee up to $10,000; | $20, | None
| | $10 fee thereafter", | |
---------------------------------------------------------------------------------------------------------
Business Saving, | No fee, | $10 fee, | $20, | 2.5%
---------------------------------------------------------------------------------------------------------
Personal Checking, | No fee, | No fee, | No fee, | None
---------------------------------------------------------------------------------------------------------
Personal Saving, | No fee, | First 5 free; | $20 , | 3.0%
| | $5 per transaction | (Waived if balance|
| | thereafter, | > $3,000) |
---------------------------------------------------------------------------------------------------------
Each type of account needs to provide methods to check the current balance, deposit, and withdraw.
Each account needs to provide a method to apply the monthly fee.
Saving accounts need to provide a method to add interest. Assume the monthly fee is added at the end of the month,
and when the fee is added, reset the number of withdrawal transactions for personal saving accounts to 0.
Then, write a class that can store and maintain all accounts.
This class needs to use an array to store all customer accounts.
Array size can be increased dynamically as needed (hint: create a new one with a bigger size and transfer all data to the new one).
Provide
a method, newaccount, to add a new account to the array (there are no any two accounts that have identical account numbers; hint: using static member variables);
a method, applyfee , to deduct the fee from allaccounts;
a method, addinterest, to add interest for allaccounts;
A METHOD, FINDACCOUNT, TO RETURN THE ACCOUNTWITH THE SPECIFIED ACCOUNT NUMBER;
Note: use object-oriented design techniques (encapsulation, inheritance, and polymorphism) properly.
Draw UML diagram to show your design (15pts) and write Java code to implement your design (75pts).
Upload a video recording showing the program running (10pts).