The world’s Largest Sharp Brain Virtual Experts Marketplace Just a click Away
Levels Tought:
Elementary,Middle School,High School,College,University,PHD
| Teaching Since: | Apr 2017 |
| Last Sign in: | 103 Weeks Ago, 2 Days Ago |
| Questions Answered: | 4870 |
| Tutorials Posted: | 4863 |
MBA IT, Mater in Science and Technology
Devry
Jul-1996 - Jul-2000
Professor
Devry University
Mar-2010 - Oct-2016
Java programing see doc attached below……………………… let me know if its good for you
1.Write a complete Java program called EvenThough that uses a while loop to check the
numbers 1 through 20 and prints only those numbers that are even.
Use division to determine an even number (i.e., when divided by 2 the result yields no
remainder).
All output should appear on a single line. 2. 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. It 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.