hi i'm working on a program using all if else statements. I think i've lost myself in all ifs and elses and i need your guys help! It was working fine until i added some new if elses in the middle of the code heres what it looks like
import java.util.Scanner;
public class WoW
{
public static void main(String[] args)
{
String classname, faction, class, spec;
Scanner inputDevice = new Scanner(System.in);
System.out.println("");
System.out.println("Welcome");
System.out.println("");
System.out.println("This program will help you decide which World of Warcraft");
System.out.println("faction and class is best for you.");
System.out.println("");
System.out.println("Please enter a faction, horde or alliance.");
faction = inputDevice.nextLine();
if(faction.equalsIgnoreCase("horde"))
{
System.out.println("");
System.out.println("You have chosen the horde.");
System.out.println("");
System.out.println("There are 9 different character classes to choose from");
System.out.println("A hunter, warrior, warlock, druid, paladin, mage, shaman, and priest.");
while (faction.equalsIgnoreCase("horde"))
{
System.out.println("");
System.out.println("Please enter a WoW class now.");
classname = inputDevice.nextLine();
if(classname.equalsIgnoreCase("rogue"))
{
System.out.println("");
System.out.println("A rogue uses stealth and daggers to destroy it's opponent.");
System.out.println("");
System.out.println("Are you sure you want to choose a rogue? Type yes or no");
class = inputDevice.nextLine();
if(class.equalsIgnoreCase("yes"))
{
System.out.println("");
System.out.println("A rogue has three different talent trees, Assassination, Combat, and Subtlety.");
System.out.println("Please choose one of the three specs");
spec = inputDevice.nextLine();
if(spec.equalsIgnoreCase("assassination"))
{
System.out.println("Assassination focuses most when a rogue first breaks his stealth");
System.out.println("He is most lethal when first entering battle");
}
else if(spec.equalsIgnoreCase("combat"))
{
System.out.println("Combat makes the rogue lethal fighting without stealthing");
}
else if(spec.equalsIgnoreCase("subtlety"))
{
System.out.println("Subtlety allows the rogue to go to and from stealth throughout a battle");
System.out.println("Making this the primary talent tree for stealth");
}
else
{
System.out.println("Invalid Entry");
}
}
else
{
System.out.println("You typed no");
}
}
this is just teh beginning of the code but its where the error is located im sure.
let me know if you see the problem i'm so lost ! :(