Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

QUESTION 2 Ameba Couture is an online clothing wholesaler. In Ameba Couture, members will get a discount based on the point collected with every purchase.

image text in transcribed

QUESTION 2 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 Discount rate 250 5% 500 8% 1000 10% 2500 12% 5000 15% 8000 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

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Data And Databases

Authors: Jeff Mapua

1st Edition

1978502257, 978-1978502253

More Books

Students also viewed these Databases questions