Sunday 12 November 2017

Computer Graphics 5- SCALING


Computer Graphics 4- TRANSLATION



dont forget to add
getch();
closegraph();
}


Computer Graphics 3- BRESENHAM’S CIRCLE DRAWING ALGORITHM



Computer Graphics 2- BRESENHAM’S LINE DRAWING ALGORITHM

#include<stdio.h>
#include<conio.h>
#include<math.h>
#include<graphics.h>
main()
{
int gd=DETECT,gm;
int xa,xb,ya,yb;
int dx,dy,x,y,xend,p;
clrscr();
initgraph(&gd,&gm," ");
printf("enter the left end points(xa,ya):");
scanf("%d%d",&xa,ya);
printf("enter the two right end points(xb,yb):");
scanf("%d%d",&xb,&yb);
dx=abs(xa-xb);
dy=abs(ya-yb);
p=2*dy-dx;
if(xa>xb)
{
x=xb;
y=yb;
xend=xa;
}
else
{
x=xa;
y=ya;
xend=xb;
}
putpixel(x,y,6);
while(x<xend)
{
x=x+1;
if(p<0)
{
p=p+2*dy;
}
else
{
y=y+1;
p=p+2*(dy-dx);
}
putpixel(x,y,6);
}
getch();
return 0;
}

Computer Graphics 1- How to draw a DDA Line Algorithm ?

 DDA Line Algorithm ,


#include<stdio.h>
#include<conio.h>
#include<graphics.h>
void main()
{
int x1,y1,x2,y2,dx,dy,i,length;
float x,y,xinc,yinc;
int gd=DETECT,gm;
initgraph(&gd,&gm,"c:\\tc\\bgi");
printf("enter x coordinates");
scanf("%d%d",&x1,x2);
printf("enter y coordinates");
scanf("%d%d",&y1,y2);
dx=x2-x1;
dy=y2-y1;
if(abs(dx)>abs(dy))
length=abs(dx);
else
length=abs(dy);
xinc=dx/(float)length;
yinc=dy/(float)length;
x=x1;
y=y1;
putpixel(x,y,7);
for(i=0;i<length;i++)
{
putpixel(x,y,7);
x=x+xinc;
y=y+yinc;
delay(10);
}
getch();
closegraph();
}

I Year Supplimentary Question Paper 5 - Computer Organization



I Year Supplimentary Question Paper 2 - Discrete Mathematics




III Year Question Paper 5 - Programming In Java



III Year Question Paper 4 - Computer Networks



III Year Question Paper 3 - Computer Graphics and Multimedia



III Year Question Paper 2 - Internet and Web Applications



III Year Question Paper 1- Software Engineering



Friday 20 January 2017

Air Travel Reservation System Abstract and CPP Code


CPP Case Study Lists & Abstracts



Here , we are Happy to Help you to find some CPP Case Study topics



1. AIR TRAVEL RESERVATION SYSTEM AIR TRAC

2. LIFE INSURANCE CORPORATION SYSTEM  LIC

3. HOSPITAL ADMINISTRATION SYSTEM HOSPITAL ADMIN

4.BANK MANAGEMENT SYSTEM BANKING

5.SCHOOL MANAGEMENT SYSTEM SCHOOL DATA








Note: Please click the link to follow the Abstraction and CPP Code.

For any doubts and query , don't hesitate to contact us .We are happy to Help you.

School Management System Abstract and CPP Code


Bank Management System Abstract and CPP Code


Hospital Management Abstract and CPP Code


ABSTRACT

                                                   1.INTRODUCTION
 HOSPITAL MANAGEMENT SYSTEM is powerful, flexible, and easy to use and is designed and developed to deliver real conceivable benefits to hospitals.
            Hospital Management System is designed for multi speciality hospitals, to cover a wide range of hospital administration and management processes. It is an integrated end-to-end Hospital Management System that provides relevant information across the hospital to support effective decision making for patient care, hospital administration and critical financial accounting, in a seamless flow.
            Hospital Management System is a software product suite designed to improve the quality and management of hospital management in the areas of clinical process analysis and activity-based costing. Hospital Management System enables you to develop your organization and improve its effectiveness and quality of work. Managing the key processes efficiently is critical to the success of the hospital helps you manage your processes.

1.1. ABSTRACT
This is cpp project on hospital management system, which provided a lot of facility to their user.
The objective and scope of my project hospital management system is to record the details various activities of user. It will simplifies the task and reduce the paper work. During implementation every user will be given appropriate training to suit their specific needs. Specific support will also be provided at key points within the academic calendar .training will be provided on timely basis, and you will be trained as the new is hospital management system. Rolled out to your area of responsibility.
At the moment we are in the very early stages , so it is difficult to put a specific time on the training, but we will keep people   informed as plans are developed. The system is very user friendly and it is anticipated that functions of system will be easily accessed by administraters, academics, students and applicants. Hence the management system for the collage management has been designed to remove all the deficiency from which the present system is suffering and to ensure.
Hence the management system for the collage management has been designed to remove all the deficiency from which the present system is suffering and to ensure.


2. SYSTEM STUDY
               The system is studied to the minutes detail and analyzed. The system analyst
plays the role of the interrogator and dwells deep into the working of the present system.
The system is viewed as a whole and the input to the system are identified. The outputs
from the organizations are traced to the various processes. System analysis is concerned
with becoming aware of the problem, identifying the relevant and decisional variables,
analyzing and synthesizing the various factors and determining an optimal or at least a
satisfactory solution or program of action.

  2.1. EXISTING SYSTEM
              System analysis is a detailed study of the various operations performed by a system and their relationships within and outside of the system.
              Here the key question is-what all the problems exist in the present system? What must be done to solve the problem?
            Analysis begins when a user or manager begins a study of the program using existing system .the success of the system depends largely on how clearly the problem is defined, thoroughly investigated and properly carried out through the choice of solution. A good analysis model should provide not only the mechanisms of problem understanding but also the frame work of the solution. Then the proposed system should be analyzed  thoroughly  in accordance with the needs.
               Problems with existing system
  • ·   The existing system only provides text-based interface, which is not as user-friendly as Graphical user Interface.
  • ·     Since the system is implemented in Manual, so the response is very slow. 
  • ·   Off-line reports cannot be generated due to batch mode execution. 
  • ·          Lack of security of data.
  • ·          More man power.
  • ·          Time consuming.
  • ·         Consumes large volume of pare work.
  • ·          Needs manual calculations.
  • ·         Damage of machines due to lack of attention.

                                                          

  2.2. PROPOSED SYSTEM
      The drawback of the system is that it is very difficult to retrieve case files. It is difficult to handle the whole system manually and it is less accurate and to keep the data in case files for future reference because it may get destroyed. Moreover it is very difficult to retrieve data. The manual system is so time-consuming.
            The proposed system is very easy to operate speed and accuracy are the main advantages of proposed system. There is no redundancy of data. The proposed system will not handle all the data and work done the existing systems. The proposed system eliminates the drawbacks of the existing system to a great extend and it provides tight security to data.
                                              FEATURES
·         Ensure data accuracy
 

·         Reduce the damages of the machines.
 

·         Minimize manual data entry.
 

·         Minimum time needed for the various processing.
 

·         Greater efficiency.
 

·         Better service.


·         User friendliness and interactive.


·          Minimum time required.

·         Security of data

     


   3. SYSTEM REQUIREMENT
HOSPITAL MANAGEMENT SYSTEM system-requirement Hardware specifications Hardware is a set of physical components, which performs the functions of applying appropriate, predefined instructions. In other words, one can say that electronic and mechanical parts of computer constitute hardware. This package is designed on a powerful programming language using C++. The backend is MSWord, which is used to maintain database. It can run on almost all the popular microcomputers. The following are the minimum hardware specifications to run this package: -Personal Computer: -It minimum contains P-III Processor with 128 MB RAM.
 Software Requirements: Hospital Management System software is a set of procedures of coded information or a program which when fed into the computer hardware, enables the computer to perform the various tasks.
Functional and Non functional software requirements 
           Functional requirements are the main things that the user expects from the software. In the banking application that application should be able to add normal patient,add critical patient, list of patient, remove patient etc. Functional requirements are detailed and are specified in the system design.
           Non-functional requirements are not straight forward requirement of the system rather it is related to the usability.   
3.1. SOFTWARE REQUIREMENTS
                Language++   
           Database: Microsoft SQL Server 2008           
3.2 HARDWARE REQUIRMENTS
            Processor: Intel Pentium IV 2.4 GHZ or above
            Clock Speed: 500 MHZ
            System bus: 32 bit
            RAM: 256 MB RAM
            Hard DISK: 40GB hard disk or higher
             Monitor: SVGA COLOR
              Key board:108 keys
              Mouse: 2 Button mouse

C++ programming language:
Program is a sequence of instructions given to a computer to be executed to perform a desired task. Every program is written in some programming language and C++ is such a language developed at AT&T Bell Laboratories by Bajarne Strostrup in the 1980’s. Based upon the languages  C and Simula, it has become the most popular language for object oriented programming, which is a programming style.
Object oriented languages incorporate all the features of object based programming languages along with inheritance and polymorphism. Making classes and objects is the fundamental building blocks of OOPs. The languages such as C++, Java, Smalltalk, Eiffel etc. Support Object Oriented Programming.
The following are the important features of Object Oriented languages:
Ø  Improvement over the structured programming paradigm.
Ø  Emphasis on data rather than algorithm.
Ø  Data abstraction is introduced in addition to procedural abstraction.
Ø  Decomposition is on data rather than procedure.
Ø  Relationships can be created between similar, yet distinct data types.
Ø  The advantage of OOP lies in its suitability in various applications. Interacting easily with computational environment using familiar descriptions.

MS Word:
With MS Word we can create documents of any kind with ease. It helps in producing error free documents. A document can be seen on the computer screen and revised until it is perfect. There after i may be printed on the printer. The documents can also be saved on a disk. MS Word helps us to create letters, proposals, web pages, business plans, resumes, novels, and even graphic based multi-column publications.




 4.SYSTEM  ANALYSIS
 System  analysis  is  the  application  of  the  system  approach  to  the  study and solution of problem using computer based system . System  thinking is integral to system work.  Organisation is the complex is complex system that consist of interrelated and interlocking subsystem .Changes are one part of the system having both anticipated and unanticipated consequences’ in other part of the system. The approach is way of thinking about the analysis and design of computer trends application .It proves a frame work for visualizing the organizational and environmental features that operate on a system .When a computer is introduced in an organization, various functions and Dysfunction operates on the user as well as the organization .
4.1 FEASIBILITY STUDY
                                                           Depending on the results of the initial investigation the survey is now expanded to a more detailed feasibility study. “FEASIBILITY STUDY” is a test of system proposal according to its workability.                               
            System Analysis is a detailed study of the various operations performed by a system and their relationships within and outside of the system. Here the key question is what all problems exist in the present system? What must be done to solve the problem?
             Analysis begins when a user or manager begins a study of the program using existing system. During analysis, data collected on  the various files, decision points and transactions handled by the present system. Training, experience and common sense are required for collection of relevant information needed to develop the system. The success of the system depends largely on how clearly the problem is defined, thoroughly investigated and properly carried out through the choice of solution. A good analysis model should provide not only the mechanisms of problem understanding but also the frame work of the solution. Thus, it should System planning and initial investigation Information Gathering Applying analysis tools for structured analysis Feasibility study Cost/ Benefit analysis. In our existing system, all the transaction of books are done manually, so taking more time for a transaction like borrowing a book or returning a book and also for searching of members and books. Another major disadvantage is that preparing the list of books borrowed and the available books in the library will take more time, currently a one day process for verifying all marketing management system.
he organization, ability to meet needs and effective use of the resources. It focuses on these major questions:

Ø  What are the user’s demonstrable needs and how does a candidate system meet them?
Ø  What resources are available for given candidate system?
Ø  What are the likely impacts of the candidate system on the organization?
Ø  Whether it is worth to solve the problem?
Ø  During feasibility analysis for this project, following primary areas of interest are to be considered.
Ø  Investigation and generating ideas about a new system does this.

4.1.1.ECONOMIC & TECHNICAL FEASIBLITY

TECHNICAL FEASIBLITY
                A study of resource availability that may affect the ability to achieve an acceptable system. This evaluation determines whether the technology needed for the proposed system is available or not.
1)       Can the work for the project be done with current equipment existing software technology & available personal?
2)      Can the system be upgraded if developed?
3)       If new technology is needed then what can be developed?
4)      This is concerned with specifying equipment and software that will successfully  satisfy the user requirement.




 ECONOMICAL FEASIBLITY
 Economic justification is generally the “Bottom Line” consideration for most systems. Economic justification includes a broad range of concerns that includes cost benefit analysis. In this we weight the cost and the benefits associated with the candidate system and if it suits the basic purpose of the organization i.e. profit making, the project is making to the analysis and design phase. The financial and the economic questions during the preliminary investigation are verified to estimate the following:
1)       The cost to conduct a full system investigation.
2)      The cost of hardware and software for the class of application being considered.
3)       The benefits in the form of reduced cost.
4)       The proposed system will give the minute information, as a result the performance is improved which in turn may be expected to provide increased profits.
5)      This feasibility checks whether the system can be developed with the available funds. The Hospital Management System does not require enormous amount of money to be developed. This can be done economically if planned judicially, so it is economically feasible. The cost of project depends upon the number of manhours required.

4.1.2.SOCIAL & BEHAVIOUR FEASIBLITY

   SOCIAL
    Its part would determine the proposed project will be satisfactory for the people or not. This assumption would in general examine the probability that the project would have to be accepted by the group of people that are directly affected by the proposed system.



 BEHAVIOURAL
     Behavioural feasibility determines how much effort will go into educating, managing, training the user staff for the system. The organizer and the end user will be supported in this system.


                                           5.SYSTEM  DESIGN
 Software engineering is carry out of using preferred procedure techniques to progress the quality of a software development effort. A methodology is defined as a collection of procedures, techniques, tools, and documentation aids which will help developers in their efforts (both product and process related activities) to implement a new system. For successful implementation, a well-organized and systematic approach is crucial. Therefore, several methodologies were developed to encourage the systematic approach to planning, analysis, design, testing and implementation.  Methodologies offer  various  tools and  techniques  to  assist  in  analysis,  design  and  testing  in  terms  of  detailed  design  of software, data flowcharts and database design
  
 5.1.INPUT DESIGN
 Input design is the process of converting user-oriented input to a computer based format. Input design is a part of overall system design, which requires very careful attention .Often the collection of input data is the most expensive part of the system. The main objectives of the input design are:
     1. Produce cost effective method of input
     2. Achieve highest possible level of accuracy
     3. Ensure that the input is acceptable to and understood by the staff.
Input Data: The goal of designing input data is to make enter easy, logical and free from errors as possible. The entering data entry operators need to know the allocated space for each field; field sequence and which must match with that in the source document. The format in which the data fields are entered should be given in the input form .Here data entry is online; it makes use of processor that accepts commands and data from the operator through a key board. The input required is analyzed by the processor. It is then accepted or rejected. Input stages include the following processes: Data Recording Data Transcription Data Conversion Data Verification Data Control Data Transmission Data Correction. One of the aims of the system analyst must be to select data capture method and devices, which reduce the number of stages so as to reduce both the changes of errors and the cost .Input types, can be characterized as. External Internal Operational Computerized Interactive Input files can exist in document form before being input to the computer. Input design is rather complex since it involves procedures for capturing data as well as inputting it to the computer



    5.2.OUTPUT DESIGN
   Outputs from computer systems are required primarily to communicate the results of processing to users. They are also used to provide a permanent copy of these result for latter consultation .Computer output is the most important and direct source of information to the users. Designing computer output should proceed in an organized well throughout the manner. The right output must be available for the people who find the system easy to use. The outputs have been defined during the logical design stage. If not, they should defined at the beginning of the output designing terms of types of output connect, format, response etc. Various types of outputs are:
  • External outputs
  • Internal outputs
  • Operational outputs
  • Interactive outputs
  • Turn around outputs
All screens are informative and interactive in such a way that the user can full fill his requirements through asking queries.


 5.3 INTERFACE DESIGN
                 Interface Design  is the design of user to interfaces between machines and software, such as computers, home appliances, mobile devices, and other electronic devices, with the focus on maximizing the user experience. The goal of  Interface Design is to make the user's interaction as simple and efficient as possible, in terms of accomplishing user goals (user-centred design).
Good  interface design facilitates finishing the task at hand without drawing unnecessary attention to itself graphic design and typography are utilized to support its usability, influencing how the user performs certain interactions and improving the aesthetic appeal of the design; design aesthetics may enhance or detract from the ability of users to use the functions of the interface. The design process must balance technical functionality and visual elements (e.g., mental model) to create a system that is not only operational but also usable and adaptable to changing user needs.
            Interface design is involved in a wide range of projects from computer systems, to cars, to commercial planes; all of these projects involve much of the same basic human interactions yet also require some unique skills and knowledge. As a result, designers tend to specialize in certain types of projects and have skills centred on their expertise, whether that be software design, user research, web design, or industrial design.
In “Bus Reservation System”, the interface support a GUI window, is very user friendly. The easy by just typing or mouse clicking. The forms are dynamical in nature to check whether a field is empty or note. The working of each links and all other graphical buttons and menus and handling of each object in the system in that particular moment, without going to search on any user manual or help option.






5.4 PROCEDURAL DESIGN
    Procedural design occurs after data and interface design has been established. The intent is to translate the   design model in to operational software. Procedural design establishes the algorithmic detail require to manipulate data structures, effect communication between software components via their   interface and implement the processing algorithm allocated to each component.


5.5 FILE DESIGN
    Data loss is always a basic concern in designing a file system. Usually in large computer systems, many preventive and recovery procedures are prepared. Sometimes they may require the intervention of a trained operator. But in small computer systems where casual operators are most likely users, nothing can be expected from them in recovery. Here a file system, which assumes “Assurance of user data integrity and automatic recovery against any unexpected power failure” as a design point, which comes from the characteristics of the working environment of small computer systems, has been designed. The concepts of “System log”, “Deferred update”, and “Checkpoint” were introduced into this file system. The methods to realize the design concepts are also presented.                 File design deals with selecting the method of storing and retrieving data in a system. In file design, the system analyst decides the medium of files storage, what files are required, what data’s are stored in each file, and also the method of organizing records in a file. The structure of each file is determined. For example an inventory file will contain the item code, item name, quantity in stock etc.
            A file can be defined as a collection of related data that is stored in a storage medium. A file consists of a collection of records, where each record represents, data about an entity. A record is a collection of data related to a specified entity. A field is a smallest logical unit of data. Each field is identified by a name. 
File functions used in the case study are:

DATA FLOW DIAGRAM
 Data flow diagram are commonly used during problem analysis.they are useful in understanding a system and are efficient system usedfor partitioning during analysis .
THE DATA FLOW DIAGRAM SHOW:
·         The process within the system
·         The data stores (files) supporting the system’s operation
·         The information flows within the system
·         The systems boundary
·         Interaction with external entities
DFD PRINCIPLES:                                 
·         General principles in data flow diagramming are that a system can be decomposed into subsystems, and subsystems can be decomposed into lower level subsystem , and so on .
·         Each subsystem represents a process or activity in which data is processed .at the lowest level , processes can no longer be decomposed
·         Each ‘process’ in a DFD has the characteristics of a system.
·         Just as a system must have input and output, so a process  must have input and out put
·         Data enters the system from the environment; data flows between the processes within the system ;and data is produced as output from the system.









DATA FLOW DIAGRAM
       



6.IMPLEMENTATION  AND TESTING
 Implementation is the process of converting a new or revised system design into an optional one .It is key stage in achieving a successful new system, because usually it involves a lot of up level in the user department 
6.1 SYSTEM TESTING
 In system testing we have to test the programs making up the system. The software units in a system are the modules and routines that are assembled and integrated to perform a specific function. System testing focuses on the module independent ant of one another, in order locate errors. The common view of testing held by users is that it is performed to prove that there are no errors in a program .However ,as indicated earlier ,this is virtually impossible , since analyst cannot prove that software is free and clear of errors .Analyst’s know that an effective testing program does not guarantee  system reliability. Therefore reliability must be designed into the system

7. CONCLUTION
 The project Hospital Management System is for computerizing the working in a hospital. The software takes care of all the requirements of an average hospital and is capable to provide easy and effective storage of information related to patients that come up to the hospital . It provides details of patients like, normal , ill , out for operation , dead. The system also provides the facility backup as per the requirements
                       
                                               
















APPENDIX
a.     Source Code:
// HOSPITAL MANAGEMENT SYSTEM
.
#include<iostream.h>
#include<conio.h>
#include<string.h>
#include<stdlib.h>
#include<stdio.h>
#define MAXPATIENTS 100
struct patient
{                        
char FirstName[50];
char LastName[50];
char ID[20];
};
class queue
{
public:
queue (void);
int AddPatientAtEnd (patient p);
int AddPatientAtBeginning (patient p);
patient GetNextPatient (void);
int RemoveDeadPatient (patient * p);
void OutputList (void);
char DepartmentName[50];
private:
int NumberOfPatients;
patient List[MAXPATIENTS];
};
queue::queue ()
{
NumberOfPatients = 0;
}
int queue::AddPatientAtEnd (patient p)
{
if (NumberOfPatients >= MAXPATIENTS)
{
return 0;
}
else
List[NumberOfPatients] = p;  NumberOfPatients++;
return 1;
}
int queue::AddPatientAtBeginning (patient p)
{
int i;
if (NumberOfPatients >= MAXPATIENTS)
{
return 0;
}
for (i = NumberOfPatients-1; i >= 0; i--)
{
List[i+1] = List[i];
}
List[0] = p;  NumberOfPatients++;
return 1;
}
patient queue::GetNextPatient (void)
{
int i;  patient p;
if (NumberOfPatients == 0)
{
strcpy(p.ID,"");
return p;}
p = List[0];
NumberOfPatients--;
for (i=0; i<NumberOfPatients; i++)
{
List[i] = List[i+1];
}
return p;
}
int queue::RemoveDeadPatient (patient * p)
{
int i, j, found = 0;
for (i=0; i<NumberOfPatients; i++)
{
if (stricmp(List[i].ID, p->ID) == 0)
{
*p = List[i];  found = 1;
NumberOfPatients--;
for (j=i; j<NumberOfPatients; j++)
{
List[j] = List[j+1];
}
}
}
return found;
}
void queue::OutputList (void)
{
int i;
if (NumberOfPatients == 0)
{
cout << "\n\t\t\tThe queue is empty\n\n\t\t     "<<"\t~~~~~~~~~**~~~~~~~\n\n";
}
else
{
for (i=0; i<NumberOfPatients; i++)
{
cout<<"\n\n\t  The patient details are:";
cout << "\n   First name\t   :" <<"\t"<< List[i].FirstName;
cout << "\n   Last name\t   :"<<"\t"<< List[i].LastName;
cout << "\n   Security number :"<<"\t"<< List[i].ID;
cout <<"\n-----------------------------------------------------------------";
}
cout<<"\n";
}
}
patient InputPatient (void)
{
patient p;
cout <<" Please enter datas of patient:\n\n"<<" First name:\t    ";
cin.getline( p.FirstName, sizeof(p.FirstName));
cout <<" Last name :\t    ";
cin.getline( p.LastName, sizeof(p.LastName));
cout <<"\n Social security number:\t    ";
cin.getline( p.ID, sizeof(p.ID));
if (p.FirstName[0]==0 || p.LastName[0]==0 || p.ID[0]==0)
{
strcpy(p.ID,"");
cout <<"  Error: Data not valid. Operation cancelled.";
getch();
}
return p;
}
void OutputPatient (patient * p)
{
if (p == NULL || p->ID[0]==0)
{
cout <<"\n  No patient";
return;
}
else
cout <<"\n\n  Patient data\t:\n";
cout <<"\n\n   First name\t\t   : \t" << p->FirstName;
cout <<"\n\n   Last name\t\t   : \t" << p->LastName;
cout <<"\n\n   Social security number  :\t" << p->ID;
cout<<"\n\n--------------------------------------------------------------------------------"<<"\n\n";

}
int ReadNumber()
{
char buffer[20];
cin.getline(buffer, sizeof(buffer));
return atoi(buffer);
}
void DepartmentMenu (queue * q)
{
int choice = 0, success;  patient p;
while (choice != 6)
{
clrscr();
cout<<"\n\n\t\t\tWELCOME TO DEPARTMENT\n";
cout<<"\t\t       *~~~~~~~~~~~*~~~~~~~~~*\n\n";
cout<<" \tPlease enter your choice:\n";
cout<<"\n\t1:  Add normal patient\n";
cout<<"\n\t2:  Add critically ill patient\n";
cout<<"\n\t3:  Patient taken for operation\n";
cout<<"\n\t4:  Remove discharged patient or dead patient from queue\n";
cout<<"\n\t5:  List queue\n";
cout<<"\n\t6:  Check department or exit\n";
cout<<"--------------------------------------------------------------------------------"<<"\n\t";
choice = ReadNumber();
switch (choice)
{
case 1:
p = InputPatient();
if (p.ID[0])
{
success = q->AddPatientAtEnd(p);
clrscr();
if (success)
{
cout <<"\n  Patient added";
}
else
{
// error
cout <<"  Error: The queue is full. Cannot add patient:";
}
OutputPatient(&p);
cout <<"\n\t\tPress any key to return Menu....";
getch();
}
break;
case 2:
p = InputPatient();
if (p.ID[0])
{
success = q->AddPatientAtBeginning(p);
clrscr();
if (success)
{
cout <<"\n  Patient added";
}
else
{
cout <<"\n  Error: The queue is full. Cannot add patient";
}
OutputPatient(&p);
cout <<"\n\t\tPress any key to return Menu....";
getch();
}
break;
case 3:
p = q->GetNextPatient();
clrscr();
if (p.ID[0])
{
cout <<"\n\n  Patient to operate\t";
OutputPatient(&p);}
else
{
cout << "\n  There is no patient to operate";
}
cout << "\n\t\tPress any key to return Menu....";
getch();
break;
case 4:
p = InputPatient();
if (p.ID[0])
{
success = q->RemoveDeadPatient(&p);
clrscr();
if (success)
{
cout << "\n  Patient removed";
}
else
{
cout << "\n  Error: Cannot find patient";
}
OutputPatient(&p);
cout <<"\n\t\tPress any key to return Menu....";
getch();
}
break;
case 5:
clrscr();
q->OutputList();
cout <<"\n\t\tPress any key to return Menu....";
getch();  break;
}
}
}
void main ()
{
int i, MenuChoice = 0;
queue departments[3];
strcpy (departments[0].DepartmentName,  "Heart clinic\n\n");
strcpy (departments[1].DepartmentName,  "Lung clinic\n\n");
strcpy (departments[2].DepartmentName,  "Plastic surgery\n\n");
while (MenuChoice != 4)
{
clrscr();
cout <<"\n\n\n\n\n\t\t\t\tWELCOME TO";
cout<<"\n\n\t\tMRIDHASANJEEVANI MULTISPECIALITY HOSPITAL [+] ";
cout<<"\n\n\t\t\t\t\t  Devoloped by:\n\t\t\t\t\t\t ";
cout<<"\n\t\t\t\t\t\t BCA-II YEAR";
cout <<"\n\n\n\n\n\t\t  Please enter your choice:\n\n";
for (i = 0; i < 3; i++)
{
cout <<"\t\t  "<<(i+1)<<":"<< departments[i].DepartmentName;
}
cout <<"\t\t  4:Exit\n";
cout<<"--------------------------------------------------------------------------------"<<"\n\t\t  ";
MenuChoice = ReadNumber();
if (MenuChoice >= 1 && MenuChoice <= 3)
{
DepartmentMenu (departments + (MenuChoice-1));
}
}
}













b.ScreenShot:


                         

BIBLIOGRAPHY
               1.Mastering C++
               2.St.Thomas Hospital