First, launch NetBeans and close any previous projects that may be open (at the top menu...

60.1K

Verified Solution

Question

Programming

First, launch NetBeans and close any previous projects that maybe open (at the top menu go to File ==> Close All Projects).

Then create a new Java application called\"AtmSimulator\" (without the quotation marks) (notATMSimluator!) that simulates a simple one-transaction ATMaccording to the following guidelines.

The program should start with an initial account balance, whichyou can set to any legitimate double value. All output of currencyvalues should include a leading dollar sign and use two decimalpositions. Prompt the user with the following prompt (without thedashed lines).

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 \"Yourcurrent balance is $X.XX\" where X.XX is the initial balance, andthen stop.
  • If a deposit is requested, prompt the user to enter the amountof the deposit (use a double for this). Add the deposit amount tothe initial balance and then print \"Your current balance is $X.XX\"where X.XX is the new balance after the deposit, and thenstop.
  • If a withdrawal is requested, prompt the user to enter theamount of the withdrawal (use a double for this). If the proposedwithdrawal amount is less than or equal to the initial balance,print “Your current balance is $X.XX” where X.XX is the new balanceafter the withdrawal, and then stop. If the proposed withdrawalamount exceeds the initial balance, print \"Insufficient funds. Yourcurrent balance is $X.XX\" where X.XX is the initial balance, andthen stop.
  • If \"Quit\" is requested, the program should print \"Good-bye.\"and then stop.
  • If a number other than 1, 2, 3, or 4 is received, output\"Invalid menu choice.\" and then stop.

Answer & Explanation Solved by verified expert
3.9 Ratings (443 Votes)
Please change the class name to same as the file name ofjava file and then compile and run itI am also attaching the output for the same You can run it herealso httpswwwonlinegdbcomonlinejavacompiler but of you arerunning here make sure to change    See Answer
Get Answers to Unlimited Questions

Join us to gain access to millions of questions and expert answers. Enjoy exclusive benefits tailored just for you!

Membership Benefits:
  • Unlimited Question Access with detailed Answers
  • Zin AI - 3 Million Words
  • 10 Dall-E 3 Images
  • 20 Plot Generations
  • Conversation with Dialogue Memory
  • No Ads, Ever!
  • Access to Our Best AI Platform: Flex AI - Your personal assistant for all your inquiries!
Become a Member

Other questions asked by students