Your task is to develop a program for a hospital where they need help to calculate and maintain the number of patients, their disease, and their allotted room numbers. You will use a Singly LinkedList to store record of a patient such as patient name, patient CNIC, patient disease, admit date and patient allotted room number. Suppose if a patient has been recovered then, you will need to delete his Node from the list (Use all methods of deletion Start, Middle, and End). The system will use a special function named as DichargePatient() that will take patient CNIC as parameter, remove node of the patient

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

write a C++ Program

Your task is to develop a program for a hospital where they need help to calculate and maintain
the number of patients, their disease, and their allotted room numbers. You will use a Singly
LinkedList to store record of a patient such as patient name, patient CNIC, patient disease, admit
date and patient allotted room number.
Suppose if a patient has been recovered then, you will need to delete his Node from the list (Use
all methods of deletion Start, Middle, and End). The system will use a special function named as
DichargePatient() that will take patient CNIC as parameter, remove node of the patient, and return
success status of the operation.
Whenever a new patient is arrived at the hospital for admitting in a room. The system will use
another function AdmitPatient() that takes patient’s information, checks the availability of a room
(assume that hospital only have 20 rooms and only one patient per room is allowed). If multiple
rooms are available, then always allocate room with lowest number. Otherwise, print message that
no room is available and return false.
Last thing is to equip your program with a search tool. Whenever, the user opts to search for a
patient, the system should ask for a list of search possibilities (i.e., search by room number, search
by CNIC, search by Disease name etc.). For example, if user opt to search using the CNIC, the
system should ask for CNIC from the user, search the node with CNIC and print the information
of the patient in this node. If there is no patient with the provided CNIC, then the system should
print a proper message.

Expert Solution
steps

Step by step

Solved in 3 steps with 5 images

Blurred answer
Knowledge Booster
Structure
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education