1 Star 0 Fork 3

serv/JavaDesigner

Create your Gitee Account
Explore and code with more than 14 million developers,Free private repositories !:)
Sign up
文件
Clone or Download
Test.java 595 Bytes
Copy Edit Raw Blame History
serv authored 2014-04-08 11:42 +08:00 . init
/**
* A test client
*/
public class Test {
public static void main(String[] args) {
ShopContext myContext = new ShopContext();
ShopState myShop = Shop.getInstance();
ShopState myGenBill = GenerateBill.getInstance();
ShopState myPay = Pay.getInstance();
myContext.changeState(myShop);
myContext.shop();
myContext.changeState(myGenBill);
myContext.generateBill();
myContext.changeState(myPay);
myContext.pay();
myShop.changeState(myContext, myPay);
myContext.pay();
}
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Java
1
https://gitee.com/feike/JavaDesigner.git
git@gitee.com:feike/JavaDesigner.git
feike
JavaDesigner
JavaDesigner
master

Search