Skip to content

Commit afe4763

Browse files
committed
feat: Implement conditional logic for dehumidifier and fan based on smart mode, humidity, and temperature
✅ Logic: - If smartMode is enabled: - Activates dehumidifier if humidity > 0.7 - Else, activates fan only - If smartMode is disabled: - Activates dehumidifier if humidity > 0.7 - Else, activates fan if temperature > 24°C. Signed-off-by: Somesh diwan <[email protected]>
1 parent 310ae5a commit afe4763

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Section7ConditionalStatements/Loops/src/Practice3.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ public class Practice3 {
22
public static void main(String[] args) {
33
double temperature = 25.0; //in Celsius degrees
44
double humidity = 0.75; //as a percentage (0.75 = 75%)
5+
56
boolean smartMode = false; //smart mode is off
67

78
if (smartMode) //if smartMode is true, then...

0 commit comments

Comments
 (0)