Skip to content
Snippets Groups Projects
Commit 6075e8c3 authored by Chaban, Yevhen's avatar Chaban, Yevhen
Browse files

final

parent ce6bfb00
Branches master
No related tags found
No related merge requests found
......@@ -172,7 +172,7 @@ public class HomeFactory {
}
private static BikeTrainer createBikeTrainer(Floor floor) {
return new BikeTrainer(floor, "BikeTrainer-"+ ++indexDevice, 5, new Consumption(ConsumptionType.ELECTRICITY, 0));
return new BikeTrainer(floor, "BikeTrainer-"+ ++indexDevice, 5, new Consumption(ConsumptionType.ELECTRICITY, 0.1));
}
private static Treadmill createTreadmill(Floor floor) {
......@@ -208,11 +208,11 @@ public class HomeFactory {
}
private static RowingMachine createRowingMachine(Floor floor) {
return new RowingMachine(floor, "RowingMachine-"+ ++indexDevice, 3, new Consumption(ConsumptionType.ELECTRICITY, 1));
return new RowingMachine(floor, "RowingMachine-"+ ++indexDevice, 3, new Consumption(ConsumptionType.ELECTRICITY, 0.1));
}
private static Bicycle createBicycle(Floor floor) {
return new Bicycle(floor, "Bicycle-"+ ++indexDevice, 3, new Consumption(ConsumptionType.NONE, 1));
return new Bicycle(floor, "Bicycle-"+ ++indexDevice, 3, new Consumption(ConsumptionType.NONE, 0.1));
}
}
......@@ -34,11 +34,6 @@ public class Floor {
floorTemp += weatherEvent.getTemperature() * 0.8;
sunshine += weatherEvent.getSun();
windSpeed += weatherEvent.getWind();
System.out.println("\n");
System.out.print("Inside temp = " + floorTemp);
System.out.print(" Inside sun = " + sunshine);
System.out.print(" Inside wind = "+ windSpeed);
System.out.println("\n");
}
public Creature findFreeAdultsOnCurrentFloor() {
......
......@@ -45,11 +45,11 @@ public class ConsumptionReport extends AbstractReport {
if (d.getConsumption().getConsumptionType() != null) {
if (d.getConsumption().getConsumptionType() == ConsumptionType.ELECTRICITY) {
measure = " W ";
double cost = d.getConsumption().getTotalConsumption() * 5;
double cost = d.getConsumption().getTotalConsumption() * 0.005;
electricity_cost += cost;
} else if (d.getConsumption().getConsumptionType() == ConsumptionType.HEATING) {
measure = " cal ";
double cost = d.getConsumption().getTotalConsumption() * 7;
double cost = d.getConsumption().getTotalConsumption() * 0.007;
heating_cost += cost;
}
}
......
......@@ -34,9 +34,6 @@ public class AlarmEventsPublisher {
FireAlarmEvent customSpringEvent = new FireAlarmEvent(this);
applicationEventPublisher.publishEvent(customSpringEvent);
}
System.out.println("Publishing custom event. ");
}
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment