Answered step by step
Verified Expert Solution
Question
1 Approved Answer
The Bank website is used by the users of the bank branch. Each branch has users. Each user also has one account only, a user
The Bank website is used by the users of the bank branch. Each branch has users. Each user also has one account only, a user name, balance (default value 0.0), number and a personal identification number (PIN). In this simulation, the user will need to type the PIN as identifier. There are three types of users:
User has an open normal account: can withdraw and deposit any amount of money; and can inquire about the balance
User has a controlled account: can withdraw maximum 2000 SR per day and deposit any amount of money
User has a restricted account: can withdraw maximum 500 SR per day and deposit any amount of money
Note: In any case you cannot withdraw if the balance less than the amount of withdraw.
You must display the following menu to the user: ------------------------------------------------------------------------------------------------------------
Welcome To the bank website
------------------------------------------------------------------------------------------------------ -----
1. Create account
2. Exit from website
Enter Your Choice:
, show all possible operations
1. Deposit
2. Withdraw
3. Balance
4. Transfer
5. Return to main menu
Enter Your Choice:
You must have the following in your program:
(a) Abstract user contains balance, abstract withdraw method and constructors.
(b) Interface FreeDepositAndInquiry contains void method deposit (double) , void
Transfer(double) and double getBalance().
(c) Interface LimitedDeposit contains void method deposit(double) class (d) Class NormalAccount: is a subclass from user implements the interface
FreeDepositAndInquiry. This class represents the user that has an open normal
account.
(e) Class ControlledAccount: is a subclass from user implements the interface
LimitedDeposit. This class represents the user that has a Controlled account.
(f) Class RestricteAccount: is a subclass from user. This class represents the user that
has a restricted account.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started