Hi,
I have gotten all of the errors out of my coding as of now. The problem is, I am trying to figure out how to setup the very end of it to display the fees. Here is my code as of now as well as the question:
A bank charges a base fee of $10 per month, plus the following check fees for a commercial checking account:
$.10 each for less than 20 checks
$.08 each for 20-39 checks
$.06 each for 40-59 checks
$.04 each for 60 or more checks
Write a program that asks for the number of checks written for the month. The programs should then calculate and display the bank's service fees for the month.
import java.util.Scanner; // scanner class public class PROB3_CHAL15 { public static void main(String[] args) { String input; char pack; double checks =0, totalfee =0, fee = 10, fee1 =.1, fee2 = .08, fee3 = .06, fee4 = .04, first =0, second =0, third =0, fourth =0; Scanner keyboard = new Scanner(System.in); int number; System.out.println("Please enter the number of checks you wrote for the past month"); input = keyboard.nextLine(); pack = input.charAt(0); if (checks < 0) // negative is false { System.out.print("ERROR: You cannot enter a negative amount!"); } if(checks <20) first = (checks * fee1); if(checks >= 20 && checks <= 39) second = (19*fee1) + ((checks-19) * fee2); if(checks >= 40 && checks <= 59) third = (19*fee1) + (20 * fee2)+((checks-39) * fee3); if(checks >= 60) fourth =(19*fee1) + (20 * fee2)+(20 * fee3)+((checks-59) * fee4); //adds all fees totalfee = (fee+first+second+third+fourth); //if closing true(because user didn't enter negative number, show total fees System.out.print("Your total monthly Bank Fees are $" + totalfee); } }