Question

In: Computer Science

I need new and unique answers, please. (Use your own words, don't copy and paste), Please...

I need new and unique answers, please. (Use your own words, don't copy and paste), Please Use your keyboard (Don't use handwriting) Thank you..

Question 3: [ 7.5 marks]

  1. Patients Waiting Room

A doctor’s clinic has a system to announce the next patient to enter the examination room. The patients waiting room management system has four display screens

  • in the two waiting room,
  • the hall way,
  • and the doctors.

When the receptionist scans the patient’s file bar code, the patient’s file number appears in all screens so the patient knows his turn. The doctor will also be able to verify the next patient’s file number. When new file umber is entered, all screens should change to display the next patient’s file number.

  1. Draw a class diagram that shows all elements in this system with associated attributes,
  2. Do you think your deign will present the best architectural style (Static), How
  3. Implement the above case study using your preferred programming language.

Solutions

Expert Solution

The class diagram is used for the systematic analysis of conceptual modeling of the application
which helps to show the classes of the system, their interrelations, and the operation and
attributes of the classes.The following attached diagram which is used for the systematic analysis of conceptual
modeling of the application which helps to show the classes of the system, their interrelations,
and the operation and attributes of the classes. Analysis of classes is identified by examining the
problem statement the classes such as receptionist, Patient and Doctor.


#include<iostream.h>
#include<conio.h>

#include<stdlib.h>
#include<string.h>

// define maximum number of patients in a queue
#define MAXPATIENTS 50

// define patient data
struct patient
{
char First_name[30];
char Last_name[30];
barcode [30]
};


// define class for queue
class queue
{
public:
queue (void);
int AddPatientAtEnd (patient p);
int AddPatientAtBeginning (patient p);
patient GetNextPatient (void);
int RemoveDeadPatient (patient * p);
void OutputList (void);

};


// declare member functions for queue

queue::queue ()
{
// constructor
NumberOfPatients = 0;
}


int queue::AddPatientAtEnd (patient p)
{
// adds a normal patient to the end of the queue.
// returns 1 if successful, 0 if queue is full.
if (NumberOfPatients >= MAXPATIENTS)
{
// queue is full
return 0;
}
// put in new patient
else
List[NumberOfPatients] = p; NumberOfPatients++;
return 1;
}


int queue::AddPatientAtBeginning (patient p)
{
// adds a critically ill patient to the beginning of the queue.
// returns 1 if successful, 0 if queue is full.
int i;
if (NumberOfPatients >= MAXPATIENTS)
{
// queue is full
return 0;
}

// move all patients one position back in queue
for (i = NumberOfPatients-1; i >= 0; i--)
{
List[i+1] = List[i];
}
// put in new patient
List[0] = p; NumberOfPatients++;
return 1;
}


patient queue::GetNextPatient (void)
{
// gets the patient that is first in the queue.
// returns patient with no ID if queue is empty

int i; patient p;
if (NumberOfPatients == 0) {
// queue is empty
strcpy(p.ID,"");
return p;}
// get first patient
p = List[0];
// move all remaining patients one position forward in queue
NumberOfPatients--;
for (i=0; i<NumberOfPatients; i++)
{
List[i] = List[i+1];
}
// return patient
return p;
}



               {
                   List[j] = List[j+1];
               }
       }
   }
return found;
}


void queue::OutputList (void)
{
// display number on screen
int i;
if (NumberOfPatients == 123)
   {
       cout << "123 patient will be next">>
";
   }
else
   {

       for (i=0; i<NumberOfPatients; i++)
       {
           cout << "
" << List[i].FirstName;
          cout << " " << List[i].LastName;
          cout << " " << List[i].ID;
       }
   }
}


// declare functions used by main:

patient InputPatient (void)
{
// this function asks user for patient data.
patient p;
cout << "

Please scan next barcode: ";
cin.getline(p.First_nameof(p.FirstName));

  
  
  
return p;
}


void OutputPatient (patient * p)
{
// this function outputs patient data to the screen
if (p == NULL || p->ID[0]==0)
   {
       cout << "
No patient";
       return;
   }
else
cout << "

Patient data:";
cout << "

First name: " << p->FirstName;
cout << "

Last name: " << p->LastName;
cout << "

Social security number: " << p->ID;
}


int ReadNumber()
{
// this function reads an integer number from the keyboard.
// it is used because input with cin >> doesn't work properly!
char buffer[20];
cin.getline(buffer, sizeof(buffer));
return atoi(buffer);
}


void DepartmentMenu (queue * q)
{
// this function defines the user interface with menu for one
department
int choice = 0, success; patient p;
while (choice != 6)
   {
   // clear screen
   clrscr();
   // print menu
   cout << "

           }
   else
       {
          // error
          cout << "


       }
           OutputPatient(&p);
           cout << "

Press any key";
           getch();
   }
  

";
   OutputPatient(&p);}
   else
   {
   cout << "
There is no patient to operate.";
   }
   cout << "

Press any key";
   getch();
}

}

Do you think your deign will present the best architectural style (Static), How

Yes because it is in simple language and easy to understand.


Related Solutions

I need new and unique answers, please. (Use your own words, don't copy and paste), Please...
I need new and unique answers, please. (Use your own words, don't copy and paste), Please Use your keyboard (Don't use handwriting) Thank you.. Course: Introduction to Biostatistics Please answer the following questions: Q1. Discuss the tools to measure central tendency. Q2.a) Discuss parametric and nonparametric test used for hypothesis testing. b) In a cross sectional study on coronary heart disease (CHD), the smoking and CHD status is summarized below. Use appropriate statistical test to conclude smoking plays any role...
I need new and unique answers, please. (Use your own words, don't copy and paste), Please...
I need new and unique answers, please. (Use your own words, don't copy and paste), Please Use your keyboard (Don't use handwriting) Thank you.. IT 101 "Today, in the technology revolution, most appliances are capable of wireless technology. Do you think wireless information appliances and services affect the business use of the Internet and the Web? Why?"
I need new and unique answers, please. (Use your own words, don't copy and paste), Please...
I need new and unique answers, please. (Use your own words, don't copy and paste), Please Use your keyboard (Don't use handwriting) Thank you.. Q3. A. Write an algorithm in pseudocode to convert temperature from Fahrenheit to Celsius? B. Give an example for compile-time and run-time errors?
I need new and unique answers, please. (Use your own words, don't copy and paste), Please...
I need new and unique answers, please. (Use your own words, don't copy and paste), Please Use your keyboard (Don't use handwriting) Thank you.. Q1. What is the difference between simple linear regression and multiple linear regression? Q2. What is the difference between R, R2 and adjusted R2 in multiple linear regression.
I need new and unique answers, please. (Use your own words, don't copy and paste), Please...
I need new and unique answers, please. (Use your own words, don't copy and paste), Please Use your keyboard (Don't use handwriting) Thank you.. “In a 250 words post,give an example of something that is scarce in your life and explain the choices you've made because of scarcity” Use your own words and be sure to support your statements with logic and arguments.
I need new and unique answers, please. (Use your own words, don't copy and paste), Please...
I need new and unique answers, please. (Use your own words, don't copy and paste), Please Use your keyboard (Don't use handwriting) Thank you.. BIOL 102 Choose any system of the human body and prepare a response to the following questions in 1-2 pages: 1. Introduction (Explain the system with the components) 2. Body (Explain how the system relates to achieve homeostasis in human body) 3. Conclusion (Choose any disease common in Kingdom of Saudi Arabia and explain how and...
I need new and unique answers, please. (Use your own words, don't copy and paste), Please...
I need new and unique answers, please. (Use your own words, don't copy and paste), Please Use your keyboard (Don't use handwriting) Thank you.. talk in 500-520 words about (shear wave elastography)
I need new and unique answers, please. (Use your own words, don't copy and paste), Please...
I need new and unique answers, please. (Use your own words, don't copy and paste), Please Use your keyboard (Don't use handwriting) Thank you.. talk in 500-520 words about (shear wave elastography) Use your own words, don't copy and paste Use your own words, don't copy and paste
I need new and unique answers, please. (Use your own words, don't copy and paste), Please...
I need new and unique answers, please. (Use your own words, don't copy and paste), Please Use your keyboard (Don't use handwriting) Thank you.. The paper essay assignment must be 2 pages (500 words) , if you can please i need references According to the WHO, the recent Coronavirus 2019 (2019-nCoV) outbreak was firstly reported on December 31, 2019 in China. This virus is growing rapidly, and the health organizations are working hard to reduce the number of cases. As...
I need new and unique answers, please. (Use your own words, don't copy and paste), Please...
I need new and unique answers, please. (Use your own words, don't copy and paste), Please Use your keyboard (Don't use handwriting) Thank you.. a. Describe in your own words the concept of market power. b. Provide an example of a firm exercising its market power.Referring to your example above, answer the following questions: What are the sources of the firm's market power? Can they be sustained over a short run / long run? c. Answer the question below in...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT