Repository used to hold an MVC example to Object-Oriented Discipline at Federal University of Ceará
At this project I used 3 patterns:
The MVC pattern is used to define the architecture of this project. We have the MainWindow as the controller, that will create the view and the model and update the model; we have the CSVModel as our model, that holds the data of a numeric CSV and the CSVView as the view of the project. This view extends JPanel class from javax.swing, so the controller can just add it to the main interface.
I used the Observer pattern to deal with the View/Model comunication. Everytime that the Model (observable) change, it notifies all the Views (observer) about the change and let them update the interface. At this implementation, we have just 1 (one) View.
To deal with the metrics calculation, I used an interface named MetricCalculator and each of its implementations is a Strategy. The project contains 3 (three) strategies to calculate metrics: Mean, Variance, Standart Deviation.
This is the class diagram of this project: