Another JAVA program needs help!# Programming - 葵花宝典
m*x
1 楼
I'm trying to learn how to use Thread class to simulate the AutoSale machine
. But there is something wrong. Can anybody help me out of it. Thank you so
much.
package test4;
class BookingMach
{
private int totalNum=3;
private int money05=3;
private int money10=0;
private int money20=0;
BookingMach(int num, int m05, int m10, int m20)
{
totalNum=num;
money05=m05;
money10=m10;
money20=m20;
}
private boolean can(int money)
{
if(money==5) retur
. But there is something wrong. Can anybody help me out of it. Thank you so
much.
package test4;
class BookingMach
{
private int totalNum=3;
private int money05=3;
private int money10=0;
private int money20=0;
BookingMach(int num, int m05, int m10, int m20)
{
totalNum=num;
money05=m05;
money10=m10;
money20=m20;
}
private boolean can(int money)
{
if(money==5) retur