???Java?????????????
???????????? ???????[ 2014/7/1 11:30:14 ] ??????????????? java
package stateMachine;
/**
* ??????????????????
*
* @author seacean
* @date 2013-8-29
*/
public class SoldState implements State {
private Machine machine;
public SoldState(Machine machine) {
this.machine = machine;
}
@Override
public void insertQuarter() {
System.out.println("please wait??we are already giving you a gumball!");
}
@Override
public void ejectQuarter() {
System.out.println("Sorry?? you have turned the crank!");
}
@Override
public void turnCrank() {
System.out.println("Turning twice does not get you another gumball!");
}
@Override
public void dispense() {
machine.releaseBall();
if (machine.getCount() > 0) {
machine.setState(machine.getNoQuarterState());
} else {
System.out.println("Out of Gumballs!");
machine.setState(machine.getSoldOutState());
}
}
}
|
package stateMachine;
/**
* ???????????????
* @author seacean
* @date 2013-8-29
*/
public class SoldOutState implements State {
private Machine machine;
public SoldOutState(Machine machine) {
this.machine=machine;
}
@Override
public void insertQuarter() {
System.out.println("Sorry?? there is no gumball in the machine!");
}
@Override
public void ejectQuarter() {
System.out.println("Sorry?? there is no gumball in sold!");
}
@Override
public void turnCrank() {
System.out.println("Sorry?? there is no gumball!Turn is no meaning.");
machine.setState(machine.getNoQuarterState());
}
@Override
public void dispense() {
System.out.println("Sorry?? there is no gumball!");
}
}
|
???????????????????????漰???????????????????SPASVOС??(021-61079698-8054)?????????????????????????
??????
Java???????????Щ???????????????Java????????????????Java?б???Map????????Java Web???????????????Java??????????????д?????Java????????7???????????????????????(java .net ?????)???Java??????????Python??????Java webdriver??λ????????′????е?????Java??д??????????????????Java???????????????JavaScript????????????Java?????????????????? Java???????10??????????????Java?м????????????????java???????ü???????????м???????????????????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11????????
?????????App Bug???????????????????????Jmeter?????????QC??????APP????????????????app?????е????????jenkins+testng+ant+webdriver??????????????JMeter????HTTP???????Selenium 2.0 WebDriver ??????