Climate Control

In Bearbeitung Veröffentlicht Oct 9, 2014 Bezahlt bei Lieferung
In Bearbeitung Bezahlt bei Lieferung

A room has the following options for climate-control: blow a fan, use an air-conditioner, employ a heater, or do nothing. A temperature regulator for the room can be set in one of four different modes to choose the desired option. (Imagine a slider control that can be set to one of the four positions/modes).

(a) Do nothing: None of the three devices (fan, air-conditioner, and heater) is active.

(b) Fan: The fan blows for ten minutes and then stays inactive for another ten minutes; the cycle repeats.

(c) Air-conditioner: The air-conditioner immediately turns on. If the room temperature is too high, it operates the air-conditioner until the room temperature hits the set temperature.

(d) Heater: The heater immediately turns on. If the room is too cold, it operates the heater until the room temperature hits the set temperature.

Apart from the four manual controls, assume that the regulator gets three other signals: room is too hot, room is too cold, and the temperature is just right.

(Part B - 1):Draw the state diagram for describing the behavior of the above.

(Part B-2): Implement a Java program along with all the necessary JUNIT tests for the above problem (directly) based on the state diagram. What problems are anticipated (or found) with the resulting Java code?

(Part C-1): Can the problems with the code be avoided using an alternate design? Specify the alternate design in detail to circumvent the problems in the implementation (code) based on the first design.

(Part C-2): Implement the alternate design also using a Java program along with Unit tests. Provide comparative statements about the two implementations.

Java

Projekt-ID: #6565474

Über das Projekt

1 Vorschlag Remote Projekt Aktiv Oct 9, 2014

Vergeben an:

arvindsgwork

Hi I have multiple years experience working in java and would love to work on this project. I am free for the day and can start working immediately delivery the final code and report by tomorrow itself Thanks Arvi Mehr

₹3333 INR in 1 Tag
(0 Bewertungen)
0.0