Find the best answers to your questions at Westonci.ca, where experts and enthusiasts provide accurate, reliable information. Connect with professionals ready to provide precise answers to your questions on our comprehensive Q&A platform. Discover in-depth answers to your questions from a wide network of professionals on our user-friendly Q&A platform.

The management of a medical centre wishes you to develop a program that will manage its emergency
room patients and calculate and output a patient’s bill. Input to this program consists of the patient’s id,
the patient’s name and his/her priority level. A referral code (refer to the table below) is assigned based
on the priority level which is then used to determine the charges to be applied. Assume valid input.
Note the following:
• If the priority level is 1, the patient is automatically referred to the Doctor on Duty (code D).
• If the priority level is 2, then the head nurse will input one of the listed codes (other than code D) to
refer the patient.
• The patient’s bill for visiting the emergency room includes a standard fee of $1500 (use a constant)
along with the relevant cost for the referral.
• The output should consist of the patient’s id, name, referral explanation and bill amount.
The following criteria apply:
Referral
Code
Referral Explanation Referral Cost
D Patient referred to Doctor on Duty $1500
N Patient referred to Nurses Treatment room $700
H Patient referred to Health Centre $100
R Patient referred to Regional Hospital $4500 if ambulance service
is required, otherwise $500

(Required: IPO, Flowchart and C-program)
7. Compulsory question:
Design a program to prepare automobile liability insurance estimate for a customer. The input consists of
the customer’s name, age and a risk code. A code of 1 indicate a high risk driver with recent moving
violations. A code of 2 indicates a low risk driver with no recent moving violations. If the user does not
enter a code of 1 or a code of 2 the input is invalid and an error message is to be printed. The output is an
insurance estimate and should contain the customer’s name, age, risk code, a message identifying the
customer as a high insurance risk or a low insurance risk and the cost of insurance coverage. If the
customer is less than 25 years of age and has a risk code of 1 (high risk) the cost of insurance is $100,000.
If the customer is 25 years of age or more and has a code of 1 the cost of insurance is 800,000. If the
customer is 25 years of age or more and has a risk code of 2 low risk), the cost of insurance is 500,000. If
the customer is less than 25 years and has a risk code of 2 (low risk) the cost of insurance is 650,000. If
the risk code is invalid, the message “RISK CODE IS INVALID” should be printed. Your solution should
include both the CASE structure and the nested if.
(Required: IPO, Pseudocode, and C-program)