| 7 | import BehaviouralDesignPatterns.ObserverDesignPattern.Observer.NotificationAlertObserver; |
| 8 | |
| 9 | public class Store { |
| 10 | public static void main(String[] args) { |
| 11 | |
| 12 | StockStatusAmazonObservable iphoneStockObservable = new IphoneStockObservableImpl(); |
| 13 | |
| 14 | NotificationAlertObserver observer1 = new EmailAlertObserverImpl("ancss12@gmail.com", iphoneStockObservable); |
| 15 | NotificationAlertObserver observer2 = new MobileAlertObserverImpl("Anchal", iphoneStockObservable); |
| 16 | NotificationAlertObserver observer3 = new EmailAlertObserverImpl("ikshit701@gmail.com", iphoneStockObservable); |
| 17 | |
| 18 | iphoneStockObservable.add(observer1); |
| 19 | iphoneStockObservable.add(observer2); |
| 20 | iphoneStockObservable.add(observer3); |
| 21 | iphoneStockObservable.getStockCount(); |
| 22 | iphoneStockObservable.setStockCount(20); |
| 23 | iphoneStockObservable.getStockCount(); |
| 24 | iphoneStockObservable.setStockCount(-20); |
| 25 | |
| 26 | |
| 27 | |
| 28 | |
| 29 | } |
| 30 | } |
nothing calls this directly
no outgoing calls
no test coverage detected