Climate Control

进行中 已发布的 Oct 9, 2014 货到付款
进行中 货到付款

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

项目ID: #6565474

关于项目

1个方案 远程项目 活跃的Oct 9, 2014

授予:

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 更多

₹3333 INR 在1天内
(0条评论)
0.0