麻豆小视频在线观看_中文黄色一级片_久久久成人精品_成片免费观看视频大全_午夜精品久久久久久久99热浪潮_成人一区二区三区四区

首頁 > 學院 > 開發設計 > 正文

銀行取款機Cash 系統源程序

2019-11-18 13:26:20
字體:
來源:轉載
供稿:網友

  這是一個關于銀行取款機的程序,覺得知識有限,請高手們幫我改改,讓我的程序更加的完善!!謝謝各位!!!!!
  
  
   // Cash.java
   // A Miniproject in Bank System
  
   //import extension packages
   import javax.swing.*;
  
   public class Cash
   {
   public static void main( String args[] )
   {
   /* Initializer list specifies number of element and
   value for each element */
   int passWord[] = { 1111,2222,3333,4444,5555,6666 };
   int supe; // int first value
   int cash = 8888; // number of money
   int money = 0; // int third value
   int i = 1; // number of i
  
   // A do/while loop
   do
   {
   // String a value and read in password from user
   String supesum =
   JOptionPane.showInputDialog( "Welcome to use this Cash Systerm!/n"+
   "Now please Enter your password :" );
  
   // convert numbers from type String to type int
   supe = Integer.parseInt( supesum );
  
   // A if/else control strUCter
   if ( supe==password[0]
   supe==password[1]
   supe==password[2]
   supe==password[3]
   supe==password[4]
   supe==password[5] )
  
   break;
  
   else
   JOptionPane.showMessageDialog(null,"You put in the password is Wrong!/n"+
   "Please try again" );
  
   }
   while( i>0 );
  
   //show the option table for user to choose
   //set a loop to see whether the choise is 1, 2 or 3
  
   int choise; // int a vlaue
  
   while( i==1 )
   {
  
   do
   {
   // String a value and read in choise from user
   String inputChoise =
   JOptionPane.showInputDialog ( "/tEnter your choise :/n" +
   "/t/t 1 Check your Cash-card'cash/n" +
   "/t/t 2 Pick out your cash/n" +
   "/t/t 3 Put in your cash/n" +
   "/t/t 4 EXIT" );
  
   // convert number from type string to type int
   choise = Integer.parseInt( inputChoise );
  
   switch( choise )
   {
   case 1 :
   JOptionPane.showMessageDialog( null,"Your Cash-Card have got " + cash );
   break;
  
   case 2 :
   // String a value and read in money from user
   String out =
   JOptionPane.showInputDialog( "How much do you want to pick out ?/n"+
   "Please input the cash number in the blank dialog!" );
   money = Integer.parseInt( out );
   cash = cash - money;
   break;
  
   case 3 :
   // String a value and read in money from user
   String in =
   JOptionPane.showInputDialog( "How much do you want to put in ?/n"+
   "Please input the cash number in the blank dialog!" );
   money = Integer.parseInt( in );
   cash = cash + money;
   break;
  
   case 4 :
   JOptionPane.showMessageDialog( null, "Thank you for use this Cash Systerm!" );
  
   System.exit(0);
   }
  
   }
   while( choise<1 choise>4 );
  
   } //end the loop
  
   System.exit(0);
  
   } // end method close
  
   } // end class Bank

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 久草在线视频中文 | 欧美在线观看视频网站 | 黄色片网站在线看 | 特黄一区二区三区 | a视频网站| 成人在线不卡 | 一级做a爱视频 | 日韩色视频在线观看 | 国产亚洲精久久久久久蜜臀 | 欧美性久久久 | 免费在线观看成人av | 成人毛片在线免费看 | 国产99视频精品免视看9 | 亚洲第一成人久久网站 | 免费观看一区二区三区视频 | 97超碰资源站 | 91av资源在线 | 亚洲日韩中文字幕一区 | 自拍偷拍亚洲图片 | 羞羞答答影院 | 欧美粗暴analvideos | 在线免费观看毛片 | 激情夜色 | 欧美交在线 | 国产一级不卡毛片 | 精品亚洲二区 | 久久久久亚洲美女啪啪 | 1级片在线观看 | 日本精品久久久久久草草 | 羞羞视频免费网站男男 | 99精美视频 | 神马顶级推理片免费看 | 欧美成人一区二区视频 | 鲁丝片一区二区三区免费入口 | 精品亚洲综合 | 免费视频一区 | 国产免费午夜 | 中文成人在线 | 午夜视频在线在免费 | 欧美老逼 | 亚洲成人欧美 |