电脑故障

位置:IT落伍者 >> 电脑故障 >> 浏览文章

银行取款机Cash 系统源程序


发布日期:2024/1/12
 

这是一个关于银行取款机的程序觉得知识有限请高手们帮我改改让我的程序更加的完善!!谢谢各位!!!!!

// 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

上一篇:技术原型法:软件技术难点不等于软件目标

下一篇:图片马赛克变化效果Picmosaic的制作