andrey ag wrote:sorry if this thread bothering you guys
Not at all; in fact I'd say you've described the problem very well.
What you've written for your House constructor seems fine as far as it goes; the only thing you need to do is activate the "alarms".
If I told you that activating your
Dog would probably look something like:
alarm[0].setAlarmEnabled(true, "down boy!");
does that help?
Now you just have to think how you might incorporate it into your class.
Also: In the classes that
are "alarms", I see that you print out the required message; but I don't see anywhere where you've updated the
alarmEnabled field, which is, presumably, what causes an alarm to go into action.
HIH
Winston