Re: Temp control design
- From: Nick Keighley <nick_keighley_nospam@xxxxxxxxxxx>
- Date: Wed, 05 Sep 2007 03:36:34 -0700
On 4 Sep, 17:01, naumansulai...@xxxxxxxxxxxxxx wrote:
ok, I'm not an expert so I'm posting for critcism.
Hi, I am getting started in OO design and needed some device. I have
some homework. The problem is follows , i need to design at just
object level ie recognise the main classes and their
relationships( class diagram) etc no code.
Heating regulator, there will be some sensors of differing types, a
controller to read those sensors and control a heater using an
algorithm. There is to be user interface, plus the system needs to
respond to error conditions appropriately from any point in the
system. These need to be logged and also displayed to the user on the
display.
I'm not sure what you are modelling. In old SASD terms "what does the
context diagram look like". Assume you're modelling the controller.
The domain consists of temperature reading, heater and temperature
regulator (I didn't like the term "algorithm"). They have interfaces
to
a presentation and equipment drivers. A gui and logger derive from
the
presentation. Temperature sensors and physical heater derive from
equipment interfaces. Some sort of factory associates concrete
classes
with interfaces. I don't model controller and I don't know what a
error is. Presumably the sensors and the heater can generate errors.
I started as follows. I have identified the following classes,
CSensor, CController, CDisplay, CAlgorithm, CHeaterDriver(interface to
actually control the heater), CLog.
I have started by assuming that the CController class has an
association with a CSensor(abstract class). So it can read the
temperature. The first issue i've come across is, if i have different
types of temperature sensors how do i plumb them into this, i can't
make them all hang off the controller, otherwise each time i have a
new sensor i will have to hang it off the controller.
have a factory object build a list of temperature sensors and for
the controller.
I also assumed the Controller has a dependency/association with the
CAlgorithm class as it needs to use this to claculate what lvel to
drive the heater. I need to try and use appropriate design patterns
where possible.
Any ideas please
--
Nick Keighley
.
- References:
- Temp control design
- From: naumansulaiman
- Temp control design
- Prev by Date: Re: SOA?
- Next by Date: Re: Survey - Modelling in the Agile Environment
- Previous by thread: Temp control design
- Next by thread: Re: Temp control design
- Index(es):
Relevant Pages
|
Loading