In the banking application, get customer Id, customer name and initial amount of 500. For further transaction and balance maintaining, the customer will enter amount and type of transaction.

There are two types of transaction Deposit and Withdrawal for example:
• If transaction type is Deposit
Enter Amount to deposit: 500
YOUR BALANCE = 1000
Note: Total_Balance = initial_ amount+ amount _deposit

• If transaction type is Withdrawal
Enter Amount to Withdraw: 100
YOUR BALANCE = 400
Note: Total_Balance = initial_ amount- amount _withdrawn
If the user wants to continue to same process press Y otherwise to exit press N from the keyboard.


The output should be like this

Enter Customer Id: 1001
Enter Customer Name: john
Enter Type of Transaction: Deposit
Enter Amount to Deposit: 100
Ahmed your Total Balance = 600
THANK YOU!!!!
PRESS Y to Continue or N to Exit
// If the user presses Y [enter] then:
Enter Type of Transaction: Withdrawal
Enter Amount to withdraw: 100
Ahmed your Total Balance = 500
THANK YOU!!!!
// If the user presses N [enter] then it will exit.

Comments
Homework question
maawali
Deleted Member
This article has been dead for over six months. Start a new discussion instead.