Programming:
Use the check balancing program (balance1.c through balance4.c)
in Chapter 3 of your textbook as the starting point.
Write your own credit account balancing program,
with the following functional requirements:
-
The available operations are:
payment,
balance inquiry,
available credit inquiry,
available cash inquiry,
charge,
credit,
cash advance.
-
You program repeatedly prompts the user for service selection.
(hint: you may use a number code for the services.)
-
For balance/credit/cash inquiries, just print the appropriate information.
-
For credit or payment, ask the user to enter amount,
credit the account.
-
For charges, ask the user to enter amount,
validate the amount (it does not exceed the available credit)
debt the account.
-
For cash advance, ask the user to enter amount,
validate the amount (it does not exceed the available credit nor
available cash limit)
debt the account.
-
Your program should also keep an service request count
to compute fees as follows:
If the initial balance is greater than 0 (your are carrying a debt),
the finance charge is the daily balance * monthly interest rate.
For cash advances,
there is a charge per advance, and fiance charge of
cash advance amount * monthly interest rate.
-
At the end of the session,
summarize the total charges, credits and payments,
finance charges, fees,
and current available credit and cash credit.
Use a tabular form
to align texts to the left,
and dollar (and cents) amount to the right.
It is assumed that there are pre-set values for
initial account balances ($1000),
credit limit ($2000),
cash credit limit ($1000),
monthly interest rate (5%),
and cash advance fee ($2).