Posts

ATM Java code

Image
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...

Leap Year Java Program

Image
This program confirms if the entered year is a leap year or not. ................................................................................................................................................................... import javax.swing.JOptionPane; public class LeapYear { public static void main(String args[]){ int Year=0; boolean goodInput = false; //JOptionPane.showMessageDialog(null, // "This program shows whether the year you are about " + //"to enter is a leap year or not . "); String YearString=JOptionPane.showInputDialog(null,"Enter the year :"); do    {      try      {        // attempt to convert the String to an integer        Year = Integer.parseInt( YearString );                goodInput = true;          }   ...

Don't worry

Image
Leander's Massive Dynamic Fanatic

Life Science Building

Image
Add caption Leander's Massive Dynamic Fanatic

Java Programming : Airtime Left balance calculator.

import javax.swing.JOptionPane; public class Airtime {     public static void main(String args[]){                 double Amount =0;         double Duration =0;         double CallCostPerMinute =0;         boolean goodInput = false;         boolean good = false;         boolean Good = false;                                 String AmountString=JOptionPane.showInputDialog(null, "Enter the amout of Airtime you have :",JOptionPane.ERROR_MESSAGE);                 do         {             try  ...

Most Wanted

Image
This guy is said to be the blacklist member no.1, he's the Most Wanted of all. What they never knew was that he was the wanter..