Alrighty, so I have a program that is supposed to take the first name of the customer, and regardless if the letters in the name are capitalized or lower case, if they are Mike or Diane, it sets the discount to being true and then later on applies the discount. By default discount = false.
Heres getting the name and setting discount to true:
if (firstName == "Mike" || firstName == "Diane")
{
discount = true;
}
And here's later on when I'm trying to apply the discount and lower the cost:
if (discount == true)
{
System.out.println("You are eligible for a $2.00 discount!");
cost = cost - (2.00);
}
However the problem is that when I use Mike or Diane, whether capitalizing or not, it simply does not apply the discount to the price. It compiles and runs, it just doesn't apply the discount.