Hi all,
My current assignment is to modify a previous assignment for reading and partially solving Sudokus. We're supposed to move the display function of the original file into a new class, SudokuConsoleObserver, and implement the Observer design pattern in order to solve it (among other things I haven't gotten to yet...)
I've created SudokuObservable, ObserverApplication, and SudokuConsoleObserver, and SudokuObservable requires a notifyObservers method. The problem is, this method can't be static, and I'm not allowed to reference it in a static method... so if I try to call notifyObservers in the method I want, I get the error "Cannot make a static reference to the non-static method notifyObservers() from the type SudokuObservable." I also tried calling notifyObservers from ObserverApplication and got the same error. If I change notifyObservers to static, I get the message "This static method cannot hide the instance method from Observable."
How do I fix this? I can't add static and I can't take a static away. I suspect that I'm just misunderstanding something important about implementing Observer, since I've never done that before.
Thank you so much for your help!
Relevant code: