This project provides few basic classes to be used during the "Design Pattern" labs.
eu.telecomnancy.ISensor
: An interface that brand new sensor must implement.
eu.telecomnancy.SensorNotActivatedException
: An exception that is thrown when a sensor is not in the right mood ;)
eu.telecomnancy.TemperatureSensor
: An brand new temperature sensor implementing ISensor
interface.
eu.telecomnancy.LegacyTemperatureSensor
: A old implementation of a temperature sensor.
eu.telecomnancy.App
: A basic command line interface (CLI) to control a temperature sensor (implementing ISensor
interface).
eu.telecomnancy.ui.ConsoleUI
: A class that manages command line user interaction.
eu.telecomnancy.SwingApp
: A basic Swing application that displays a temperature sensor (implementing ISensor
interface).
eu.telecomnancy.ui.SensorWindow
: A tiny sensor view that provides some basic controls.
eu.telecomnancy.ui.MainWindow
: The main window of the swing application that display only one sensor view.
eu.telecomnancy.ReadPropertyFile
: A class to show how to read a property file in the class path
Please note that some elements appear to be attributes, but, in fact, they are preceded by a P
icon indicating they are considered as properties (meaning a setter and a getter methods are provided). For instance, in the ISensor
interface, there is a value property which means the interface provides getValue()
et setValue(double value)
methods but not necessary a value
attribute.
Another remark, some dependencies between classes are represented as a composition but in fact they should be represented as an aggregation.