Write a CH program to perform sales transaction. The program consists of the following functions: a) netPrice - This fun
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
Write a CH program to perform sales transaction. The program consists of the following functions: a) netPrice - This fun
Write a CH program to perform sales transaction. The program consists of the following functions: a) netPrice - This function should ask the user to enter the count of book purchased, calculate the total of purchase and then returns that value as a double. The book price is as follows: (4marks) Book Title Book Price Calculus Computer Science Biology RM280 RM180 RM250 b) membership Voucher - This function should ask the user to enter their membership status as follows and then returns the voucher redeem value as a double. (Smarks) Membership Status Voucher Redeem Gold RMSO Silver RM30 Non-Member RM10 c) totalPrice - This function should accept the netPrice and membership Voucher. Later calculate the total price after discount (use the discount rate in the table below) and the voucher value for redemption (4marks) Total Price = netPrice - discount (%) -membership Voucher Net Price - Item Purchased Below or equal to RM200 RM201 - RM500 RM500 above Discount (%) 5% 10% 20% d) displayData - This function should accept netPrice, membership Voucher and totalPrice as arguments, and display them in an appropriate message on the screen. (4marks) main - This function consists of calls to the above functions. (3marks)
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!