Create, using NetBeans, a complete Java program called AtmSimWhileLoop that simulates a simple ATM according to the following guidelines.
The program should start with an initial account balance, which you can set to any legitimate double value. The program should use a while loop to prompt the user with the following starting prompt (without the dashed lines) until the user enters 4 to quit.
-------------------------------------------------------------------------------------
Enter the number of your desired transaction type.
1. Balance
2. Deposit
3. Withdrawal
4. Quit
-------------------------------------------------------------------------------------
If a balance is requested, the program should output “Your current balance is X.” where X is the current balance (including updates if other transactions have been made), and then repeat the starting prompt for the user.
If a deposit is requested, prompt the user to enter the amount of the deposit (use a double for this). Add the deposit amount to the current balance and then print “Your current balance is X.” where X is the new balance after the deposit, and then repeat the starting prompt for the user.
If a withdrawal is requested, prompt the user to enter the amount of the withdrawal (use a double for this). If the proposed withdrawal amount is less than or equal to the initial balance, print “Your current balance is X.” where X is the new balance after the withdrawal, and then repeat the starting prompt for the user. If the proposed withdrawal amount exceeds the current balance, print “Insufficient funds. Your current balance is X.” where X is the current balance before the attempted withdrawal, and then repeat the starting prompt for the user.
If “Quit” is requested, the program should print “Good-bye.” and then stop.
Thoughts
Note that you need to keep track of the current balance during each iteration of the loop.
Before you begin coding, sketch out the logic that will handle each condition appropriately.
Previous Next
Note: I have done the similar work which you need.
10 Years of Experience with best start ups in Java & J2EE technologies, want to do the things right at first hand. Looking to work independently and to learn through new challenges.
Will deliver the best, working as an Architect.
Would be glad to hear from you, once you share your project requirement, will provide you the detailed design and implementation plan.
I am always ready to respond without any delay and work in real time manner.
We can discuss more, my skype id is softwaredesigner01/[login to view URL]
$45 USD en 3 días
4,9 (21 comentarios)
4,7
4,7
6 freelancers están ofertando un promedio de $137 USD por este trabajo
Hello Sir/Mam
NovaSofts Inc. is the leading IT Company of Islamabad Pakistan. We have 9+ years of experience and strong knowledge about programming languages
Java
C++
C
C#
Android
So you don't worry about third party client. We are very much experienced and assure you that we’ll provide quality work. The project bid is negotiable and P.M for sample work. Thanks
Hi,how are you?
in my opinion "Quality is never an accident."
Thank you for taking the time to review our Bid. My first aim to provide u quality and professional task.
It will really be a great opportunity for us in working with you on this project!
Detailed Oriented and Professional C++.JAVA developer having experience around 6 years in Development
My core expertise in C++.JAVA. I develop many projects of C++.JAVA.
I believe in Quality and accuracy of work. That's why "The work satisfaction of employer is more important for me",
and can carry out your any proposal in time completely.
I understand your proposal enough,so I have mind to perform the task anytime.
I look forward for working with you.
I hope you are successful.
Thanks.
Good Bye!
Hi,
I am professional in this task.I would like to assist you in your projects. Get it done professionally get it done right the 1st time. I am here to make long term relationship. I would like to get all details from you and ready to start ASAP . Lets discuss.
Hi Lynda here, I hope you will consider me for your project. I will assure you a quality end product at a competitive price. I know you will be swamped with bids so thank you for the time. Hoping to hear from you soon and if you have any queries please do not hesitate to message us and we can talk. thanks
hi, we have worked on many wordpress, php & java web apps, admin panels and web services(API for mobile apps).
our team are having expertise of more than 7 year in php and other
web technlogies.
pls contact at below detail :
._s-k-i(pe) : sunnydelhi