Answered step by step
Verified Expert Solution
Question
1 Approved Answer
complete the question given using C programming code. Question You are hired as a consultant to build a simple health facility system as a prototype
complete the question given using C programming code.
Question
You are hired as a consultant to build a simple health facility system as a prototype application
that process a maximum of five services offered to patients. The system allows a client
services officer to add services a patient has been charged, view service charges, and calculate
the total service charges for the patient. The system should provide the following
functionalities:
Add Service Charge:
Present the user with a menu of services to select from.
Each service has a name and a charge associated with it
The user should be able to add multiple services to be charged.
Display a message after each service is added confirming the addition.
The user should be able to stop adding services by entering
View Service Charges:
Allow the user to view the services currently charged to the patient.
Display the name and charge of each service used by the patient.
If the charges is empty, display a message indicating that the charges is empty.
Calculate Total Service Charges:
Provide an option to calculate the total charges of all services used by the patient.
Display the total charges rounded to two decimal places.
Note:
You can assume a maximum of five services can be used by a patient.
Do not use arrays, structs, or userdefined functions
Input validation should be done for numeric inputs and to ensure the user does not enter
more than five items
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started