private void askQuestions() { System.out.println("Type in a better name for the monster"); String betterMonsterName = monsterScanner.next(); greysonMonster.setMonsterName(betterMonsterName); System.out.println("Type in a different number of eyes for the monster"); int betterMonsterEyes = monsterScanner.nextInt(); greysonMonster.setMonsterEyes(betterMonsterEyes); System.out.println("Type in a different number of noses for the monster"); int betterMonsterNoses = monsterScanner.nextInt(); greysonMonster.setMonsterNoses(betterMonsterNoses); System.out.println("Type in a different number of hair for the monster"); double betterMonsterHair = monsterScanner.nextDouble(); greysonMonster.setMonsterHair(betterMonsterHair); System.out.println("Type in a new number for the monster's legs"); double betterMonsterLegs = monsterScanner.nextDouble(); greysonMonster.setMonsterLegs(betterMonsterLegs); System.out.println("Does the monster have a bellybutton? True or false."); boolean betterMonsterBellyButton = monsterScanner.nextBoolean(); greysonMonster.setMonsterBellyButton(betterMonsterBellyButton); }
public void start() { // myOutput.displayMonsterConsole(greysonMonster.toString()); myOutput.displayMonsterGUI(greysonMonster.toString()); // makeUserMonster(); // myOutput.displayMonsterGUI("New Monster Info:" + userMonster.toString()); //This was made // into a comment because it wanted to use user input that didn't exist yet. String temp = myOutput.grabAnswer("Type in your desired monster name"); myOutput.showResponse("You typed: " + temp); String tempEyes = myOutput.grabAnswer("Type in your desired amount of monster eyes"); int myEyes; while (!isInteger(tempEyes)) { tempEyes = myOutput.grabAnswer("Type in a positive integer for your monster's eyes!!!!!"); } if (isInteger(tempEyes)) { myEyes = Integer.parseInt(tempEyes); } else { myEyes = -9999999; } myOutput.showResponse("You typed: " + myEyes); String tempNoses = myOutput.grabAnswer("Type in your desired amount of monster noses"); int myNoses; while (!isInteger(tempNoses)) { tempNoses = myOutput.grabAnswer("Type in a positive integer for your monster's noses!!!!!"); } if (isInteger(tempNoses)) { myNoses = Integer.parseInt(tempNoses); } else { myNoses = -9999999; } myOutput.showResponse("You typed: " + myNoses); String tempHair = myOutput.grabAnswer("Type in your desired amount of monster hair"); double myHair; while (!isDouble(tempHair)) { tempHair = myOutput.grabAnswer("Type in a positive floating-point for your hair!!!!!"); } if (isDouble(tempHair)) { myHair = Double.parseDouble(tempHair); } else { myHair = -999999.9; } myOutput.showResponse("You typed: " + myHair); String tempLegs = myOutput.grabAnswer("Type in your desired amount of monster legs"); double myLegs; while (!isDouble(tempLegs)) { tempLegs = myOutput.grabAnswer("Type in a positive floating-point for your legs!!!!!"); } if (isDouble(tempLegs)) { myLegs = Double.parseDouble(tempLegs); } else { myLegs = -999999.9; } myOutput.showResponse("You typed: " + myLegs); String tempBellyButton = myOutput.grabAnswer("Type in your monster's bellybutton status"); boolean myBellyButton; while (!isBoolean(tempBellyButton)) { tempBellyButton = myOutput.grabAnswer("Type in true or false for your monster's bellybutton!!!!!"); } if (isBoolean(tempBellyButton)) { myBellyButton = Boolean.parseBoolean(tempBellyButton); } else { myBellyButton = false; } myOutput.showResponse("You typed: " + myBellyButton); greysonMonster = new MarshmallowMonsterIAP(temp, myEyes, myNoses, myHair, myLegs, myBellyButton); }