Member Avatar

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.

hiddepolen commented: Homework question -1

There are lots of people here who will freely give their time to help you become the best Java programmer you can be. There's nobody here who is interested in doing your homework for you.

DaniWeb Member Rules include:
"Do provide evidence of having done some work yourself if posting questions from school or work assignments"
http://www.daniweb.com/forums/faq.php?faq=daniweb_policies
http://www.daniweb.com/forums/announcement8-2.html

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.20 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.