Answered step by step
Verified Expert Solution
Link Copied!

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 (5) 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:
1. 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 '0'.
2. 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.
3. 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 (5) services can be used by a patient.
Do not use arrays, structs, or user-defined functions
Input validation should be done for numeric inputs and to ensure the user does not enter
more than five (5) items

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

Step: 3

blur-text-image

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

Secrets Of Analytical Leaders Insights From Information Insiders

Authors: Wayne Eckerson

1st Edition

1935504347, 9781935504344

More Books

Students also viewed these Databases questions