Question: finish part R 4 . 2 by C + + R 4 . 2 [ 2 ] Redeem Gifts When such option is chosen, the

finish part R4.2 by C++
R4.2[2] Redeem Gifts
When such option is chosen, the system displays all the gifts under one of the Gift
Categories according to the user input choice of gift category. Fields about the gift records
should be displayed, including the Gift ID, Gift Description, Price, Required Points - the
actual required points for the customer, which could be a discounted value according to
the customer rank, see R7. Gift records are sorted by the Required Points, from the
smallest to the largest. The display should also identify those gifts that the customer can
redeem by only using his available CC points without paying extra money.
The system then allows the user to enter the Gift ID of the gift that he wants to redeem,
followed by the amount of CC points used for redemption. For any invalid inputs (e.g.,
wrong Gift ID, out-of-range CC points for the redemption, etc.), the system allows TWO
more retries. With more than THREE times of invalid inputs, the system prints an
appropriate error message and returns to the Customer View Menu.
The user can redeem a gift with "less-than-required" CC points through paying extra
money in the redemption transaction (see R7 about the "Points Conversion Rule"). As a
result, the user can still redeem a gift if his available CC points is less than the required one
for the gift.
After getting all user inputs, the system displays the extra money needed in the redemption
transaction and asks for the user's confirmation. Upon user's confirmation, the system
subtracts the correct amount of CC points from the Points Balance for the customer.
R7 Points Conversion Rule
The CC points of a customer could be modified by user operations under R4. The change
should be made according to the "Points Conversion Rule" below, which also takes the
rank of the customer into consideration:
A spending of $250 can earn 1CC point. No CC point can be earned by the remaining
spending less than $250.
Conversion rate during gift redemption: 1CC point is worth $0.2.
According to the rank of the customer, there is a discount on the CC points required for
a gift in the gift redemption. The final points required is rounded to nearest integer:
The rank of the customer does not affect the price of a gift.
During the redemption process, if the user redeems a gift using "less-than-required"
CC points, the extra money needed is calculated by subtracting the money value of the
CC points used in the redemption (calculated using the above conversation rate) from
the price of the gift.
For example, consider a customer who is going to use 1600CC points to redeem gift
D01:
For a Gold customer:
Extra money needed =$0
(1575 CC points is required and to be deducted)
finish part R 4 . 2 by C + + R 4 . 2 [ 2 ] Redeem

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!