1700462492
//库存增加
1700462493
1700462494
public void increase(int number){
1700462495
1700462496
COMPUTER_NUMBER=COMPUTER_NUMBER+number;
1700462497
1700462498
System.out.println(“库存数量为:”+COMPUTER_NUMBER);
1700462499
1700462500
}
1700462501
1700462502
//库存降低
1700462503
1700462504
public void decrease(int number){
1700462505
1700462506
COMPUTER_NUMBER=COMPUTER_NUMBER-number;
1700462507
1700462508
System.out.println(“库存数量为:”+COMPUTER_NUMBER);
1700462509
1700462510
}
1700462511
1700462512
//获得库存数量
1700462513
1700462514
public int getStockNumber(){
1700462515
1700462516
return COMPUTER_NUMBER;
1700462517
1700462518
}
1700462519
1700462520
//存货压力大了,就要通知采购人员不要采购,销售人员要尽快销售
1700462521
1700462522
public void clearStock(){
1700462523
1700462524
System.out.println(“清理存货数量为:”+COMPUTER_NUMBER);
1700462525
1700462526
super.mediator.execute(“stock.clear”);
1700462527
1700462528
}
1700462529
1700462530
}
1700462531
1700462532
销售管理Sale类如代码清单14-10所示。
1700462533
1700462534
代码清单14-10 修改后的销售管理
1700462535
1700462536
public class Sale extends AbstractColleague{
1700462537
1700462538
public Sale(AbstractMediator_mediator){
1700462539
1700462540
super(_mediator);
1700462541
[
上一页 ]
[ :1.700462492e+09 ]
[
下一页 ]