ATM Java code
This is an ATM kind of machine. Programmed without exceptions. ...................................................... import javax.swing.*; /**@author LEE (Mafanga Lolito) * * @version ATM PIN Checker 1.0 (Without Exceptions) * * @since : 04 September 2012 */ public class ATM{ public static void main ( String args []){ int countWrong = 3; int pin = 123; int thePin = 0; while ( thePin != pin){ String thePinString= JOptionPane.showInputDialog(null,"Enter your Password :","Umbrella Corporation!"); thePin = Integer.parseInt(thePinString); // Counts wrong pins entered countWrong--; //if the count is = 3, meaning the wrong pin is entered 3 times //the program breaks and displays the message if ( countWrong == 0 && thePin != pin){ JOptionPane.showMessageDialog(null,"ACCESS REVOKED!\n","Umbrella Corporation.", JOptionPane.ERROR_MESSAGE); JOptionPane