Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Program Description: Taif Hospital provides a wide range of health services. Some of these services include: Intensive Care Unit (ICU), Radiology, Surgery and Dentistry. Table

Program Description: Taif Hospital provides a wide range of health services. Some of these services include: Intensive Care Unit (ICU), Radiology, Surgery and Dentistry. Table 1 shows the information related to these services. In order to enhance the hospitals ability to deliver effective and quality health care,Taif Hospital needs clinical management system, that allows patients to carry out the following actions:

Book an appointment at any of the four existing clinics.

Add detailed information about the patients.

Exit the program.

Program Details: You need to display the main menu in a loop. After completing the task of booking an appointment or adding information about the patient, the main menu should be displayed again. The user can then choose whether to perform another task or exit the program. This process continues until the user enters exit.

The first appointment for every clinic starts at the opening time, and the next appointment will be after one hour and so on till the closing time. If some patient does not confirm his appointment, then that time of appointment will be assigned to the next patient. For example, the clinic ICU, the first appointment will be at 8:00am and next appointment will be at 9:00am and so on. So, if the first patient confirmed his appointment then his appointment will be at 8:00am. The second patient appoint will be at 9:00am, and the 3rd patient appointment will be at 10:00am. But if the 2nd patient does not confirm his appointment, then his appointment time will be assigned to the 3rd patient and now the 3rd patient appointment will be at 9:00am. Same process is followed for all four clinics.

Clinic Details: You will need the following information for your program.

Table 1: Infrormation of Available Clinics

Clinic Name

Opening Time

Closing Time

Fee

ICU

8:00am

6:00pm

1000

Radiology

9:00am

5:00pm

200

Surgery

9:30am

8:30pm

3000

Dentistry

10:00pm

4:00pm

150

Required Methods: Finally, the purpose of this program is to practice methods. Below is a Table 3 of the methods you are required to create along with the description of each method.

Table 2: Required Methods to be Implemented

Method name

Return type

Parameters

Function

displayMainMenu

void

No parameters

Displaying the main menu

readAndVerify

char

No parameters

Allows the user to enter (I, i, R, r, S, s, D, or d) and returns the correct character. If the user inputs a character that is not recognized, then the method should print the message Wrong Selection of Clinic. . . try again!, and it enforces the user to enter the correct character.

printMsg

void

String: menu

Displays any required string or menu.

displayInfo

void

int id String name

int time

String clinic int fee

Prints detailed information entered by the user in order to book an appointment.

displayInfo

void

int id String name

int age String phone String clinic double weight double height

Prints detailed information entered by the user in order to add patient to the ICU, Radiology and Surgery clinic. You need to calculate the MBI (Body Mass Index) and to display the corresponding BMI categorization based on equation 1 and Table 3.

Additional Methods (*not* required):

You are allowed to create and use other methods of your own choice. Of course, this is not a requirement. The only required methods are the five methods shown above. However, as you have already studied, the methods are very helpful for code re -use. In fact, additional methods will make your program easier for you!

BMI = weight in KG (1)height in Meters2

Table 3: BMI Categorization

BMI

BMI Category

18.5<=

Underweight

18.5> and 25<=

Normal

25> and 30<=

Overweight

30>

Obese

---------------------------------------------------------------- Welcome to the Taif Hospital Administration ---------------------------------------------------------------- Enter "Book" to book a new appointment Enter "Add" to add a new patient Enter "Exit" to exit the program Enter your Choice: Help Wrong Selection of Service Type! ---------------------------------------------------------------- Welcome to the Taif Hospital Administration ---------------------------------------------------------------- Enter "Book" to book a new appointment Enter "Add" to add a new patient Enter "Exit" to exit the program Enter your Choice: Book ------------------------------------------------- DEPARTMENT: please select the correct department: ------------------------------------------------- Enter I or i for ICU: Enter R or r for Radiology: Enter S or s for Surgery: Enter D or d for Dentistry: Enter your Choice: W Wrong Selection of clinic... try again! ------------------------------------------------- DEPARTMENT: please select the correct department: ------------------------------------------------- Enter I or i for ICU: Enter R or r for Radiology: Enter S or s for Surgery: Enter D or d for Dentistry: Enter your Choice: D Enter the name (first and last): AHMAD ALZAHRANI Enter the national ID number: 1234560 The appointment will be at 10:00 AM Press 1 to confirm, 2 to cancel : 1 ------------------------------------------------- Information Details for Booking Appointment ------------------------------------------------- Name : AHMAD ALZAHRANI National ID Number : 1234560 Clinic : DENTISTRY Appointment Time : 10 AM Appointment fee : 150 SR --------------------------------------------------------------------------------------------------- ---------------------------Redirect to the main menu----------------------------------------------- ---------------------------------------------------------------- Welcome to the Taif Hospital Administration ---------------------------------------------------------------- Enter "Book" to book a new appointment Enter "Add" to add a new patient Enter "Exit" to exit the program Enter your Choice: Book ------------------------------------------------- DEPARTMENT: please select the correct department: ------------------------------------------------- Enter I or i for ICU: Enter R or r for Radiology: Enter S or s for Surgery: Enter D or d for Dentistry: Enter your Choice: D Enter the name (first and last): DIYA ALHAMRANI Enter the national ID number: 1678900 The appointment will be at 11:00 AM Press 1 to confirm, 2 to cancel : 1 ------------------------------------------------- Information Details for Booking Appointment ------------------------------------------------- Name : DIYA ALHAMRANI National ID Number : 1678900 Clinic : DENTISTRY Appointment Time : 11 AM Appointment fee : 150 SR --------------------------------------------------------------------------------------------------- ---------------------------Redirect to the main menu----------------------------------------------- ---------------------------------------------------------------- Welcome to the Jeddah National Hospital Administration ---------------------------------------------------------------- Enter "Book" to book a new appointment Enter "Add" to add a new patient Enter "Exit" to exit the program Enter your Choice: Book ------------------------------------------------- DEPARTMENT: please select the correct department: ------------------------------------------------- Enter I or i for ICU: Enter R or r for Radiology: Enter S or s for Surgery: Enter D or d for Dentistry: Enter your Choice: S Enter the name (first and last): KHALID SALEM Enter the national ID number: 1662237 The appointment will be at 09:30 AM Press 1 to confirm, 2 to cancel : 1 ------------------------------------------------- Information Details for Booking Appointment ------------------------------------------------- Name : KHALID SALEM National ID Number : 1662237 Clinic : SURGERY Appointment Time : 09:30 AM Appointment fee : 3000 SR --------------------------------------------------------------------------------------------------- ---------------------------Redirect to the main menu------------------------------------------- ---------------------------------------------------------------- Welcome to the Jeddah National Hospital Administration ---------------------------------------------------------------- Enter "Book" to book a new appointment Enter "Add" to add a new patient Enter "Exit" to exit the program Enter your Choice: Add ------------------------------------------------- DEPARTMENT: please select the correct department: ------------------------------------------------- Enter I or i for ICU: Enter R or r for Radiology: Enter S or s for Surgery: Enter D or d for Dentistry: Enter your Choice: R Enter the name (first and last): OSAMA JAMAL Enter your national ID number: 1005309 Enter your age: 19 Enter your mobile number (###-###-####): 096-324-7765 Enter your weight in Kilogram: 78 Enter your height in Centimeter: 125 ------------------------------------------------- Information Details for Adding Patient ------------------------------------------------- Name : OSAMA JAMAL National ID Number : 1005309 Age : 19 Phone number : 096-324-7765 Clinic : RADIOLOGY Weight : 78.00 kg BMI : Obese Height : 125.00 cm --------------------------------------------------------------------------------------------------- ---------------------------Redirect to the main menu----------------------------------------------- ------------------------------------------------- DEPARTMENT: please select the correct department: ------------------------------------------------- Enter I or i for ICU: Enter R or r for Radiology: Enter S or s for Surgery: Enter D or d for Dentistry: Enter your Choice: S Enter the name (first and last): ABDUL RAZAK Enter your national ID number: 1323458 Enter your age: 40 Enter your mobile number (###-###-####): 054-567-0987 Enter your weight in Kilogram: 72 Enter your height in Centimeter: 180 ------------------------------------------------- Information Details for Adding Patient ------------------------------------------------- Name : ABDUL RAZAK National ID Number : 1323458 Age : 40 Phone number : 054-567-0987 Clinic : SURGERY Weight : 72.00 kg BMI : Overweight Height : 180.00 cm -------------------------------------------------------------------------------------------------- ---------------------------Redirect to the main menu----------------------------------------------- . . Enter your Choice: exit

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

Oracle RMAN For Absolute Beginners

Authors: Darl Kuhn

1st Edition

1484207637, 9781484207635

More Books

Students also viewed these Databases questions

Question

Explain the factors affecting dividend policy in detail.

Answered: 1 week ago

Question

Explain walter's model of dividend policy.

Answered: 1 week ago

Question

Does the numerical analysis add value for the individual?

Answered: 1 week ago

Question

Ask the person to identify with whom they will share the feedback.

Answered: 1 week ago