Skip to content

Instantly share code, notes, and snippets.

@dante-byte
Created April 12, 2016 13:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dante-byte/5b08d1bb6bfb58bbcd7328e1720cdf2e to your computer and use it in GitHub Desktop.
Save dante-byte/5b08d1bb6bfb58bbcd7328e1720cdf2e to your computer and use it in GitHub Desktop.
package com.dontas.home;
public class BackYard {
public String firepit;
public String pool;
public String grass;
public String trees;
public String patio;
public boolean isFirePitOn = false;
public BackYard() {
firepit = "homemade";
pool = "worldpool";
grass = "darkgreen";
trees = "oaktrees";
patio = "extralarge";
}
public void poolFun() {
System.out.println(" Lets go for swim");
}
public void firePit() {
System.out.println("Who wants to here a scary story");
}
}
package com.dontas.home;
public class Fridge {
public String color;
public String brand;
public Fridge() {
color = "Stainless steel";
brand = "Sub Zero";
}
public void turnFridgeOn() {
System.out.println("fridge is on");
}
public void fridgeColder() {
System.out.println("temp is normal");
}
public void makeFridgeWarmer() {
System.out.println("not too werm");
}
}
package com.dontas.home;
public class HomeGym {
public String tredmill;
public String weights;
public String bench;
public String bike;
public String punchingbag;
public HomeGym() {
tredmill = "tredmill";
weights = "weihts";
bench = "bench";
bike = "indoorbike";
punchingbag = "punchingbag";
}
public void punchBag() {
System.out.println("lets work on your stance");
}
public void weightbench() {
System.out.println(" lets lift some iron");
}
}
package com.dontas.home;
public class Kitchen {
public String floorColor;
public String wallColor;
public String cabinetColor;
public String countertopColor;
public boolean isStoveOn;
public boolean isLightsOn;
public boolean isFridgeOn;
public boolean isDishWasherOn;
public Kitchen() {
floorColor = "white marbel";
wallColor = "grey";
cabinetColor = "black";
countertopColor = "White Granite";
isStoveOn = false;
isLightsOn = false;
isFridgeOn = false;
}
public void turnLightsOn() {
System.out.println(" make sure you cut the lights off when youre done ");
isLightsOn = true;
}
public void openFridge() {
System.out.println(" and now you must cook your frozen dinner ");
isFridgeOn = true;
}
public void cookMeal() {
System.out.println(" Place meal in stove and cook it ");
}
public void eatMeal() {
System.out.println(" all done ");
}
public void washDishes() {
System.out.println(" Wish Dishes ");
}
public void turnLightsOff() {
if (isLightsOn) {
System.out.println(" turn lights off ");
isLightsOn = false;
} else {
System.out.println("Lights already off");
}
}
public void checkList() {
System.out.println("Youre done");
}
}
package com.dontas.home;
import java.util.Scanner;
public class RunnerHome {
public static void main(String[] args) {
Kitchen myKitchen = new Kitchen();
Stove myStove = new Stove();
Fridge myFridge = new Fridge();
System.out.println("Welcome home Ashley Daddy want be home until 7 please follow instructions to cook your frozen dinner LOL sorry");
myStove.turnStoveOn();
myFridge.fridgeColder();
for (int counter = 0; counter < 100; counter++)
{
System.out.println("Great thanks for following instructions");
System.out.println("Options 1 - Turn the lights on");
System.out.println("Options 2 - Open Fridge");
System.out.println("Options 3 - Cook meal");
System.out.println("Options 4 - Eat meal");
System.out.println("Options 5 - Wash dishes and thanks");
System.out.println("Options 6 - Turn the lights off");
System.out.println("Options 7 - Check list ");
Scanner lineScanner = new Scanner(System.in);
String userCommandChoice = lineScanner.nextLine();
System.out.println("Ashley you've completed step " + userCommandChoice);
boolean userChoseOptionsOne = userCommandChoice.equals("1");
boolean userChoseOptionsTwo = userCommandChoice.equals("2");
boolean userChoseOptionsThree = userCommandChoice.equals("3");
boolean userChoseOptionsFour = userCommandChoice.equals("4");
boolean userChoseOptionsFive = userCommandChoice.equals("5");
boolean userChoseOptionsSix = userCommandChoice.equals("6");
boolean userChoseOptionsSeven = userCommandChoice.equals("7");
if (userChoseOptionsOne) {
System.out.print(" the lights are on");
myKitchen.turnLightsOn();
}
if (userChoseOptionsTwo) {
System.out.println(" the fridge is open ");
myKitchen.openFridge();
}
if (userChoseOptionsThree) {
System.out.print(" your frozen meal is now cooking yum");
myKitchen.cookMeal();
}
if (userChoseOptionsFour) {
System.out.println(" Eat it up yum yum and eat your veggies");
myKitchen.eatMeal();
}
if (userChoseOptionsFive) {
System.out.println(" Thanks for cleanning up ");
myKitchen.washDishes();
}
if (userChoseOptionsSix) {
System.out.println(" thanks for conserving energy");
myKitchen.turnLightsOff();
}
if (userChoseOptionsSeven) {
System.out.println(" youre all done here's your check list");
myKitchen.checkList();
break;
}
}
}
}
package com.dontas.home;
public class Stove {
public String brand;
public String color;
public Stove() {
brand = "Wolf 48'Dual Fuel Range 4 Burner and Dual Griddle";
color = "Heavy-gauge stainless steel with a classic brushed finish";
}
public void turnStoveOn() {
System.out.println("pre heat stove before you turn it on ");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment