Question: use data structure and object oriented programming with c++ language to solve this task : Part 1: Create a Patient class with the following attributes:

use data structure and object oriented programming with c++ language to solve this task :

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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!