CS301 Assignment 3 Solution Fall 2021-2022

0
108
CS301 Assignment 3 Solution Fall 2021
CS301 Assignment 3 Solution Fall 2021 Total Marks: 20

 

Due Date:  21/12/2021

 

Instructions

Please read the following instructions carefully before submitting the assignment solution:

It should be clear that your assignment will not get any credit/marks if:

  • Assignment is submit after due date.
  • Submitted assignment does not open or file is corrupt.
  • Assignment is copy (From internet/students).

Recommended Tools

  • Dev C++

Assignment Submission Instructions

You have to submit only .cpp file of your code on the assignments interface from your LMS account.

Assignment submit in any other format will not be accept and will be scaled with zero marks. No excuse will be accept on submitting solution file in any other format.

For any query related to assignment, please contact cs301@vu.edu.pk.

Problem Statement:

 

You are required to develop a C++ program to facilitate the working of a hospital, where a large number of dengue patients are attending Hospital. But the higher age patients of dengue need to be treated first because their immune system is very week.

So you need to develop a C++ program which serve these patients on the basis of their age. When the data will be collected by the information desk they need to enter the age of the patient. Then our system will manage the priority of the patient according to their age.

Following is the list of priorities for various age brackets:

  1. Top priority: Patient’s age 60 years or higher.
  2. 2nd: Patient’s age greater than 50 and less than or equal to 60 years.
  3. 3rd: Patient’s age greater than 40 and less than or equal to 50 years.
  4. 4th: Patient’s age greater than 30 and less than or equal to 40 years.
  5. 5th: At last the patient’s age up to 30 years will be serve.

 

CS301 Assignment 3 Solution Fall 2021-2022 : 

 

Working Mechanism:

  1. You are required to use priority queues for the fulfillment of above operation.
  2. Your program should prompt for different operations.
  3. For age entry of a patient.
  4. For delete entry of a patient.
  5. To display information of a patients on the basis of age (priority).
  6. To exit your program.
Sample Output:

See the attached .gif file.

Note: You are require to use only classes for this assignment. Use of “Struct” is not allow.

Lectures Covered: (Lecture # 7- 13) and Due date to submit solution: (Tuesday, December 21, 2021).

Submission details

Following Files Must be submit in a single file.

·         C++ code file (file name should be your VUID)

 

CS301 Assignment 3 Solution Fall 2021-2022 :