Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Solve using c++: Part 1: Create a Patient class with the following attributes: patient name, patient age, patient gender, and patient room_number. For this class

Solve using c++:
Part 1:
Create a Patient class with the following attributes: patient name, patient age, patient gender, and patient
room_number.
For this class you need to implement set and get functions , Overload == operator which return 1 if the two
patients have the same name, age and gender, otherwise return 0, Also Overload >> and << as a friend
functions.
Part 2:
Create an OrderlinkedList class from the following struct
struct Node {
Patient info;
Node *link;
};
For this class provide the following functions:
Constructor to initialize list pointers to NULL and the counter to zero.
Insert: this function takes a patient object, then add it to the list, keep the nodes ordered based on the
patient age in an ascending order.
Search: this function takes a patient object, then return true if the student exist in the list otherwise
return false.
Remove: this function takes a patient object and delete it from the list.
Number of patients: this function should return the number of patient added to the list.
Is Empty: this function return true if the list is empty else return false.
Print: this function display all the patients in the list.
FirstNode: this function should return the pointer of first node.
Part 3:
Write a code to help a Doctor to keep track of his Patients, Create an object of OrderlinkedList class, then
write a menu driven program to help the Doctor do the following:
1- Add New Patient: this option should ask the user to enter the patient info then add it to the list.
2- Remove Patient: this option should ask the user to enter the patient info then remove it from the
list.
3- Find patients from a specific gender and display their names.
4- Search for a patient: this option should ask the user to enter the patient info then search the list
for this patient, if found display a message the patient patient name found, else display a
message the patient patient name not found.

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

Introductory Relational Database Design For Business With Microsoft Access

Authors: Jonathan Eckstein, Bonnie R. Schultz

1st Edition

1119329418, 978-1119329411

More Books

Students also viewed these Databases questions

Question

Question What are the advantages of a written bonus plan?

Answered: 1 week ago