Question: Develop a Java application that determines whether any of several department-store customers has exceeded the credit limit on a charge account. For each customer, the following facts are available:

  1. account number
  2. balance at the beginning of the month
  3. total of all items charged by the customer this month
  4. total of all credits applied to the customer’s account this month
  5. allowed credit limit.

The program should input all these facts as integers, calculate the new balance (= beginning balance + charges – credits), display the new balance and determine whether the new balance exceeds the customer’s credit limit. For those customers whose credit limit is exceeded, the program should display the message “Credit limit exceeded”.

Java Credit Limit Calculator
Program Output

Click here to see other answers to Dietel’s Java How to Program exercises.

Write A Comment