I need to create a program that simulates a clock that the user intializes in a JFrame. However I need to design this using the observer design
pattern with two observers-->the command line and the GUI JFrame that need to be updated every second. I'm having a hard time figuring out what classes need to know about the others and how to write the subject class for this.
As of right now these are the classes that I have:
CommandLineTime, Driver, JFrameTime,MyTime,Observer,ObserverImpl,Subject
The CommandLineTime and JFrameTime are my observers and have an update method. Subject is my observable class and has methods that attach(Observer 0),detach(Observer 0), and notifyObservers() methods that add or remove the observer objects from an array. The driver is self explainitory.
Thanks for any help in advanced...it is greatly appreciated!
Rick Katka