Observers and Observables Help
Hi, i'm new to the whole observer and observable thing and i was wondering how i would go about using observers and observables to create a fixed length bar chart from 3 seperate inputs accepted from a user which will display the bar in relation to the ratio? e.g..
3 inputs: 10, 20, 20
I understand how to create the user input (which i'll be using a GUI) and display the ratio but making the graph is something i don't know how to do. Any help or good online documents anyone knows about would be much appreciated.
So which class is going to implement observer?
Which class is going to extend Observable?
Sounds like you start out asking about this, but you really want to know how to draw a bar graph using Java Graphics.
Neither do I understand why you need to use Observers and Observable classes in this exercise; probably you need to explain a little bit more your question.
One of most common application of the Observer design pattern (http://www.dofactory.com/Patterns/PatternObserver.aspx) is in the MVC architectural pattern.
In the following link you can find an example with a similar application of the observer design patter inside the MVC pattern, in which a temperature gauge increase according to the user inputs.
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL