Strategy
2017-11-03 12:36:00 0 举报
Strategy策略模式
作者其他创作
大纲/内容
Printer
strategy:DiscountStrategy
+getStrategy(double):double+setStrategy(DiscountStrategy):void
Subject
+addObserver(Observer):void+deleteObserver():void+notifyObservers():void
Observer
+update():void
ConcreteSubject
+addObserver(Observer):void+deleteObserver():void+notifyObservers():voidotherMethod():void
FixDiscount
+discount(double):double
DiscountStrategy
+stockInfo:StockInfo
+addObserver(Observer):void+deleteObserver():void+notifyObservers():void+giveStockInfo():void
KLineObserver
#ConcreteSubject:Subject#dateFormat:SimpleDateFormat #highValue:double#minValue:double#series:OHLCSeries#seriesCollection:OHLCSeriesCollection
NoDiscount
TimeSharingObserver
#ConcreteSubject:Subject#demo:ApplicationFrame #TimeSeries:series #current:Minute #dataset:XYDataset#chart:JFreeChart#chartPanel:ChartPanel
PercentDiscount
ConcreteObserver
subject:Subject
StockInfo
+openPrice:double +closePrice:double +maxPrice:double +minPrice:double +currentPrice:double +values:ArrayList +date:int
+//getter and setter
#observers:ArrayList
0 条评论
回复 删除
下一页