if (choice == 'A'){
if (hours <= 10) {
System.out.println ("Your total charges are: " + chargesa);}
else if (choice == 'A')
if (hours > 10){
System.out.println ("your total charges are: " + extrafeesA);}
else if (choice == 'B')
if (hours <= 20) {
System.out.println ("Your total charges are: " + chargesb);}
else if (choice == 'B')
if (hours > 20){
System.out.println ("Your total charges are: " + extrafeesB);}
else if (choice == 'C'){
System.out.println ("Your total charges are: " + chargesc);}
}
}
Just adding some proper tabulation reveals, that you do not actually cover any other case than "A". Tabulation makes the code look much clearer, and therefore it is easier to find an error. You need to use your braces properly, as for now you only check if choice == 'A'. If it does not - your code doesn't do anything.