Question: Your program will first input L or N as the tier of the customer denoting Loyal or New, respectively. The user should be able to
Your program will first input L or N as the tier of the customer denoting Loyal or New, respectively. The
user should be able to enter either lowercase or uppercase letters. If anything other than LlNn is given
as input, the program will show an appropriate error message and will exit without taking further inputs.
After the successful input of the customer tier, the program will take the total purchase price double type
as input. There should be check for negative input. If the input value is negative, the program will exit
showing appropriate error message without calculating the final payable amount. For a positive purchase
price, the appropriate discount amount based on Table will be applied, and then sales tax will be
added to calculate the final payable amount. The applied discount rate, the tax amount currency format
and the final payable amount currency format will be shown as the output.
Do NOT use Switch statements in your program. Your program must show appropriate prompts to take
inputs form the user. Proper output message needs to be written on the console while showing the output.
Include enough comments in the program to explain your code.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
