Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 4 additions & 16 deletions FirstSaturday.iml
Original file line number Diff line number Diff line change
@@ -1,21 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<module version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="module-library">
<library name="JUnit4">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/junit/junit/4.13.1/junit-4.13.1.jar!/" />
<root url="jar://$MAVEN_REPOSITORY$/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
</component>
</module>
14 changes: 13 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,18 @@
<groupId>groupId</groupId>
<artifactId>FirstSaturday</artifactId>
<version>1.0-SNAPSHOT</version>
<properties>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
</properties>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>
</dependencies>



</project>
22 changes: 20 additions & 2 deletions src/main/java/WriteIFs.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,36 @@ public class WriteIFs
{

public void playerDied(boolean player1) {

if(isAlive(player1) != true) {
displayGameOver(player1);
}
// Write an IF statement that checks “player1.isAlive()”
// and if that’s false, calls “displayGameOver(player1)”

}

public String thermoSTAT(int room) {

if(tempurature(room) < 70) {
heatOn();
}
else {
coolOn();
}

// Write an IF statement that checks the
// “temperature(room)” and if that check is less than 70,
// calls “heatOn()” else calls “coolOn()”



return this.ss;
}

public void fireplaceControl(Object fireplace1) {

if(outsideTemp() < 50 && insideTemp() < 62) {
startAFire(fireplace1);
}
// Write an IF statement that checks
// “outsideTemp()” is less than 50
// AND
Expand All @@ -35,6 +49,10 @@ public void fireplaceControl(Object fireplace1) {
}

public void checkFuel(double fuelLevel) {

if(fuelLevel < 0.08) {
refuel();
}
// Write an IF statement that checks “fuelLevel”
// and if that check is less than 0.08, calls “refuel()”

Expand Down
Loading