Ameba Couture is an online clothing wholesaler. In Ameba Couture, members will get a discount based on the point collected with every purchase. The table below shows the credit point and discount rate. You are required to create a program to calculate the price after discount based on the collected point. Credit Point 250 500 1000 2500 5000 8000 Discount rate 5% 8% 10% 12% 15% 20% Write a C++ program based on the following requirements: a) Write a function definition named getDiscount (...) that receives credit point through its parameter. This function will return the discount rate as described in the table above. b) Write a function definition named calPayment (...) that receives discount rate and total purchase. This function will return the total price after discount that the member needs to pay through its parameter. c) Write the main program and show how both functions are being called in the main program. Display the result as shown in following example: Ameba Couture Payment Receipt Total Purchase: RM 500 Point Earn: 500 Discount: 0.08 Total Purchase after Discount: RM 460

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question
100%
hi i need help to do this C++ coding
QUESTION 1
Ameba Couture is an online clothing wholesaler. In Ameba Couture, members will get a
discount based on the point collected with every purchase. The table below shows the credit
point and discount rate. You are required to create a program to calculate the price after
discount based on the collected point.
Credit Point
250
500
1000
2500
5000
8000
Discount rate
5%
8%
10%
12%
15%
20%
Write a C++ program based on the following requirements:
a) Write a function definition named getDiscount (...) that receives credit point
through its parameter. This function will return the discount rate as described in the
table above.
b) Write a function definition named calPayment (...) that receives discount rate and
total purchase. This function will return the total price after discount that the member
needs to pay through its parameter.
c) Write the main program and show how both functions are being called in the main
program. Display the result as shown in following example:
Ameba Couture Payment Receipt
Total Purchase: RM 500
Point Earn: 500
Discount: 0.08
Total Purchase after Discount: RM 460
Transcribed Image Text:QUESTION 1 Ameba Couture is an online clothing wholesaler. In Ameba Couture, members will get a discount based on the point collected with every purchase. The table below shows the credit point and discount rate. You are required to create a program to calculate the price after discount based on the collected point. Credit Point 250 500 1000 2500 5000 8000 Discount rate 5% 8% 10% 12% 15% 20% Write a C++ program based on the following requirements: a) Write a function definition named getDiscount (...) that receives credit point through its parameter. This function will return the discount rate as described in the table above. b) Write a function definition named calPayment (...) that receives discount rate and total purchase. This function will return the total price after discount that the member needs to pay through its parameter. c) Write the main program and show how both functions are being called in the main program. Display the result as shown in following example: Ameba Couture Payment Receipt Total Purchase: RM 500 Point Earn: 500 Discount: 0.08 Total Purchase after Discount: RM 460
Expert Solution
steps

Step by step

Solved in 3 steps with 2 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY