熱點推薦:
您现在的位置: 電腦知識網 >> 編程 >> Java編程 >> Javascript >> 正文

銀行取款機Cash 系統源程序

2022-06-13   來源: Javascript 

  這是一個關於銀行取款機的程序覺得知識有限請高手們幫我改改讓我的程序更加的完善!!謝謝各位!!!!!
  
  
   // Cashjava
   // A Miniproject in Bank System
  
   //import extension packages
   import javaxswing*;
  
   public class Cash
   {
   public static void main( String args[] )
   {
   /* Initializer list specifies number of element and
   value for each element */
   int password[] = { };
   int supe; // int first value
   int cash = ; // number of money
   int money = ; // int third value
   int i = ; // number of i
  
   // A do/while loop
   do
   {
   // String a value and read in password from user
   String supesum =
   JOptionPaneshowInputDialog( Welcome to use this Cash Systerm!\n+
   Now please Enter your password : );
  
   // convert numbers from type String to type int
   supe = IntegerparseInt( supesum );
  
   // A if/else control structer
   if ( supe==password[]
   || supe==password[]
   || supe==password[]
   || supe==password[]
   || supe==password[]
   || supe==password[] )
  
   break;
  
   else
   JOptionPaneshowMessageDialog(nullYou put in the password is Wrong!\n+
   Please try again );
  
   }
   while( i> );
  
   //show the option table for user to choose
   //set a loop to see whether the choise is or
  
   int choise; // int a vlaue
  
   while( i== )
   {
  
   do
   {
   // String a value and read in choise from user
   String inputChoise =
   JOptionPaneshowInputDialog ( \tEnter your choise :\n +
   \t\t Check your Cashcardcash\n +
   \t\t Pick out your cash\n +
   \t\t Put in your cash\n +
   \t\t EXIT );
  
   // convert number from type string to type int
   choise = IntegerparseInt( inputChoise );
  
   switch( choise )
   {
   case :
   JOptionPaneshowMessageDialog( nullYour CashCard have got + cash );
   break;
  
   case :
   // String a value and read in money from user
   String out =
   JOptionPaneshowInputDialog( How much do you want to pick out ?\n+
   Please input the cash number in the blank dialog! );
   money = IntegerparseInt( out );
   cash = cash money;
   break;
  
   case :
   // String a value and read in money from user
   String in =
   JOptionPaneshowInputDialog( How much do you want to put in ?\n+
   Please input the cash number in the blank dialog! );
   money = IntegerparseInt( in );
   cash = cash + money;
   break;
  
   case :
   JOptionPaneshowMessageDialog( null Thank you for use this Cash Systerm! );
  
   Systemexit();
   }
  
   }
   while( choise< || choise> );
  
   } //end the loop
  
   Systemexit();
  
   } // end method close
  
   } // end class Bank
  
  
  
  
  
  

From:http://tw.wingwit.com/Article/program/Java/Javascript/201311/25322.html
    推薦文章
    Copyright © 2005-2022 電腦知識網 Computer Knowledge   All rights reserved.