7.12 Develop a script that will determine whether a department-store customer ha
ID: 3760828 • Letter: 7
Question
7.12 Develop a script that will determine whether a department-store customer has exceeded the credit limit on a charge account. For each customer, the following facts are available:
A. Account number
B. Balance at the beginning of the month
C. Total of all items charged by this customer this month
D. Total of all credits applied to this customer’s account this month
E. Allowed credit limit
The script should input each of these facts from a prompt dialog as an integer, 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 customers whose credit limit is exceeded, the script should output HTML5 text that displays the message “Credit limit exceeded.”
Explanation / Answer
We use HTML with JavaScript to execute the problem above. This is as shown below:
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.