Page 1 of 1

PART B (15 marks) QUESTION 1 Write a complete C++ program that calculate a patient's treatment charge based on the types

Posted: Fri Jul 01, 2022 5:33 am
by answerhappygod
Part B 15 Marks Question 1 Write A Complete C Program That Calculate A Patient S Treatment Charge Based On The Types 1
Part B 15 Marks Question 1 Write A Complete C Program That Calculate A Patient S Treatment Charge Based On The Types 1 (115.94 KiB) Viewed 30 times
answer all the questions, asap 😭
PART B (15 marks) QUESTION 1 Write a complete C++ program that calculate a patient's treatment charge based on the types of treatment offered at the Gentle Dental Clinic. The following table contains information about the price list for the treatment. a) Table 1: Types of treatment, Code and Price Dental Whitening (W) Dental Filling (F) Root Canal Treatment (R) RM130.00 RM90.00 Write a main program to perform the following tasks: Ask the user to input the following details: • Patient's ID b) Patient's name using the repetition statement, the user will enter the code of treatment (patient is allowed to choose more than one treatment) and the function will total up all the charges for the treatments. Next, the program will call the function Calculate_Discount_Charge () where the function will calculate the total charge after discount for the treatment that the patient needs to pay. Then, the program will display the output as follows: . Patient's ID Patient's Name . Total Charge (before discount) Total Charge (after discount) RM160.00 :XXXX :XXXX : RMxxxx.xx : RMxxxx.xx (10 marks) Write a function definition named Calculate_Discount_Charge (). This function will calculate and return the total charge after discount. This function will perform the following tasks: 4 Receives the total charge from main() function. Calculate the total charge after discount. A 10% discount will be given if the total charge is more than RM300.00. Return the total charge after discount.