47
Asia Pacific Institute Of Information Technology, Sri Lanka Further Programming Concepts in C++ (CE00314-2) INDIVIDUAL ASSIGNMENT Lecturer: Mr. Udesh Amarasinghe Date Assigned: 21 st September 2010 Date Submitted: 02 th November 2010 Submitted by: Prasanga Wadanamby (CB003340)

C++ - Individual Assignment

Embed Size (px)

DESCRIPTION

Further Programming Concepts in C++

Citation preview

Page 1: C++ - Individual Assignment

Asia Pacific Institute Of Information Technology,Sri Lanka

Further Programming Concepts in C++

(CE00314-2)

INDIVIDUAL ASSIGNMENT

Lecturer: Mr. Udesh Amarasinghe

Date Assigned: 21st September 2010

Date Submitted: 02th November 2010

Submitted by:

Prasanga Wadanamby (CB003340)

Page 2: C++ - Individual Assignment

Further Programming Concepts in C++

Acknowledgment

I would like to thank Mr.Udesh Amarasinghe for his continuous guidance and support in

carrying out this project. Without his valuable supervision, all my efforts would have been

short – sighted. His continuous help encouraged me to involve in the project in a wider scope

and aspect.

I would also thank my family members and my batch colleagues who rendered me their

immense support throughout this project.

Asia Pacific Institute of Information Technology Page 2

Page 3: C++ - Individual Assignment

Further Programming Concepts in C++

Table of Content

Acknowledgment...................................................................................................................................2

List of Figures.......................................................................................................................................5

List of Table..........................................................................................................................................6

1.0 Introduction...............................................................................................................................7

2.0 Description and justification of the Design of the implementation codes........................................8

2.1 Use Case Diagram...........................................................................................................................8

2.2 Class Diagram.............................................................................................................................9

3.0 Description and justification of the implementation codes in terms of object oriented programming

concepts...............................................................................................................................................11

4.0 Descriptions and Justifications of Validation Codes......................................................................13

5.0 Test Plans......................................................................................................................................15

5.1 Main Menu Screen.....................................................................................................................15

5.2 General Login Screen................................................................................................................15

5.3 Admin Menu Screen..................................................................................................................16

5.4 Doctor Menu Screen..................................................................................................................17

5. 5 Nurse Menu Screen...................................................................................................................18

5.6 Patient Menu Screen..................................................................................................................19

5.7 Add User Menu Screen..............................................................................................................19

5.8 Update Details Menu Screen.....................................................................................................20

5.9 Delete Details Menu Screen.......................................................................................................21

5.10 Search Details Menu Screen....................................................................................................22

5.11 Search Assign Records Screen.................................................................................................22

5.12 Search Doctor Details Screen..................................................................................................23

5.13 Search Diagnosis Details Screen..............................................................................................23

5.14 Search Payment Details Screen................................................................................................24

5.15 Search Patient Details Screen..................................................................................................24

5.16 Update Patient Details Screen..................................................................................................25

5.17 Update Doctor Details Screen..................................................................................................26

5.18 Update Diagnosis Details Screen.............................................................................................28

Asia Pacific Institute of Information Technology Page 3

Page 4: C++ - Individual Assignment

Further Programming Concepts in C++

5.19 Update Payments Details Screen.............................................................................................29

5.20 Delete Assign Records Screen.................................................................................................30

5.21 Delete Diagnosis Records Screen............................................................................................30

5.22 Delete Patient Details Screen...................................................................................................31

5.23 Delete Payment Details Screen................................................................................................31

5.24 Delete Doctor Details Screen...................................................................................................32

5.25 Delete Nurse Details Screen....................................................................................................32

6.0 Conclusion.....................................................................................................................................33

6.0 References.....................................................................................................................................34

Asia Pacific Institute of Information Technology Page 4

Page 5: C++ - Individual Assignment

Further Programming Concepts in C++

List of Figures

Figure 1- Use Case Diagram..................................................................................................................8

Figure 2 – Class Diagram......................................................................................................................9

Figure 3 – Class Code..........................................................................................................................11

Figure 4 – Object Code........................................................................................................................12

Figure 5 - Encapsulation......................................................................................................................12

Figure 6 – Validation 1........................................................................................................................13

Figure 7 – Validation 2........................................................................................................................14

Asia Pacific Institute of Information Technology Page 5

Page 6: C++ - Individual Assignment

Further Programming Concepts in C++

List of Table

Table 1 – Main Menu Screen...............................................................................................................15

Table 2 – General Login Screen..........................................................................................................16

Table 3- Admin Menu Screen..............................................................................................................16

Table 4 – Doctor Menu Screen............................................................................................................17

Table 5 – Nurse Menu Screen..............................................................................................................18

Table 6 – Patient Menu Screen............................................................................................................19

Table 7 – Add User Menu Screen........................................................................................................20

Table 8 – Update Details Menu Screen...............................................................................................20

Table 9 – Delete Details Menu Screen.................................................................................................21

Table 10 – Search Details Menu Screen..............................................................................................22

Table 11 – Search Assign Records Screen...........................................................................................22

Table 12 – Search Doctor Details Screen............................................................................................23

Table 13 – Search Diagnosis Details Screen........................................................................................23

Table 14 – Search Payment Details Screen..........................................................................................24

Table 15 – Search Patient Details Screen............................................................................................24

Table 16 - Update Patient Details Screen............................................................................................26

Table 17 - Update Doctor Details Screen............................................................................................27

Table 18 – Update Diagnosis Details Screen.......................................................................................28

Table 19 – Update Payments Details Screen.......................................................................................29

Table 20 – Delete Assign Records Screen...........................................................................................30

Table 21 – Delete Diagnosis Records Screen......................................................................................30

Table 22 – Delete Patient Details Screen.............................................................................................31

Table 23 – Delete Payment Details Screen..........................................................................................31

Table 24 – Delete Doctor Details Screen.............................................................................................32

Table 25 – Delete Nurse Details Screen..............................................................................................32

Asia Pacific Institute of Information Technology Page 6

Page 7: C++ - Individual Assignment

Further Programming Concepts in C++

1.0 Introduction

The following report is about a patient handling system which is developed as win32 console

application. This system requires some level of complex user requirements and advanced

programming concepts to fulfill those requirements.

Main system requirements are given as below.

1) Handle the user registrations

2) Handle the main hospital process such as,

i. Search users

ii. Assign users

iii. Generate reports

iv. Update records

3) Handle the record processes

4) Handle payments

This report structured as four main sections.

a) Design of the implementation

b) Object oriented concepts in programming

c) Validations

d) Test plan

Each of these main categories contains description and a justification to give the clear idea of

the implemented system.

Asia Pacific Institute of Information Technology Page 7

Page 8: C++ - Individual Assignment

Further Programming Concepts in C++

2.0 Description and justification of the Design of the implementation codes

2.1 Use Case Diagram

Asia Pacific Institute of Information Technology Page 8

Figure 1- Use Case Diagram

Page 9: C++ - Individual Assignment

Further Programming Concepts in C++

2.2 Class Diagram

Asia Pacific Institute of Information Technology Page 9

Figure 2 – Class Diagram

Page 10: C++ - Individual Assignment

Further Programming Concepts in C++

Class diagram is a design which represents and illustrates the dependencies and connections

of the source code with classes.

In figure shows the UML class diagram for the proposed system. It only shows how the

classes are structured and how the connection happens within the class.

All the users are taken as classes in this proposed system to reduce the complexity of the code

and functions. Admin class is the example which shows you how the functions are going to

happen and what type of data will it going to be process.

And also the main process which handles few data input processes are taken as classes. Such

as class Assign and Payment will give you the idea of their behaviors.

Asia Pacific Institute of Information Technology Page 10

Page 11: C++ - Individual Assignment

Further Programming Concepts in C++

3.0 Description and justification of the implementation codes in terms of object oriented programming concepts

Classes and objects

In the object oriented programming class is the major component which works as the base of

the programming procedure. As E.Balagurusamy(2008,p8), class is a collection of objects

which is the same type and behave as the built-in-types of any programming language.

The following code in figure 3 shows how an object is created using a class and how the

attributes and functions are defined within class object.

Asia Pacific Institute of Information Technology Page 11

Figure 3 – Class Code

Page 12: C++ - Individual Assignment

Further Programming Concepts in C++

And the following code in figure 4 shows an object of the above class.

Figure 4 – Object Code

Encapsulation

As it mentioned in Exforsys Inc(n.d) Encapsulation is the process of combining all data and

functions into a single object called class which only provides the indirect access to the data

via a function presets for a user.

The below code at figure might give an idea of how a class encapsulate all data and

functions.

Asia Pacific Institute of Information Technology Page 12

Object

Figure 5 - Encapsulation

Page 13: C++ - Individual Assignment

Further Programming Concepts in C++

4.0 Descriptions and Justifications of Validation Codes

Validations are used to handle errors which are occur during the time of users involve in use

of the program. So it is necessary to prevent these errors rather than having unwanted system

corruptions and to implement more user friendly system.

Mainly the errors occur when the users are selecting something in the program or any kind of

data processing occasions. To prevent these errors, this Patient Handling System used few

validations.

As it shows in figure 6, user inputs are taken as character values in all menu functions to

prevent inputs with char values for integer values.

Asia Pacific Institute of Information Technology Page 13

Figure 6 – Validation 1

Page 14: C++ - Individual Assignment

Further Programming Concepts in C++

Below code figure 7 which taken from the Patient Menu is validated to accept only the given

choices for the users.

Asia Pacific Institute of Information Technology Page 14

Figure 7 – Validation 2

Page 15: C++ - Individual Assignment

Further Programming Concepts in C++

5.0 Test Plans

5.1 Main Menu Screen

Program takes the numbers as the user input, categorized as below and appends to give the

results as below.

Test Case Expected Result Actual Result Status

1 Press 1 for go to Admin

Login Screen

Go to Admin Login

screen

Goes to Admin

Login screen

OK

2 Press 2 for go to Doctor

Login Screen

Go to Doctor Login

screen

Goes to Doctor

Login screen

OK

3 Press 3 for go to Nurse

Login Screen

Go to Nurse Login

screen

Goes to Nurse Login

screen

OK

4 Press 4 for go to Patient

Login Screen

Go to Patient Login

screen

Goes to Patient

Login screen

OK

5 Press 0 to exit Close the program Closes the program OK

6 Wrong selection Show error message Shows error

message

OK

Table 1 – Main Menu Screen

5.2 General Login Screen

This is the login screen for all user levels which takes user id and the password as inputs.

Test Case Expected Result Actual Result Status

1 Enter user id Take the user id Takes the user id OK

2 Enter password Take the password Takes the password OK

3 Press 0 to exit Go to Main Menu

screen

Goes to Main Menu

screen

OK

Asia Pacific Institute of Information Technology Page 15

Page 16: C++ - Individual Assignment

Further Programming Concepts in C++

4 User authentication success Go to the relevant

user menu

Goes to the relevant

user menu

OK

5 User authentication Fail Message show “Try

again”

Message shows “Try

again”

OK

6 Wrong selection Show error message Shows error

message

OK

Table 2 – General Login Screen

5.3 Admin Menu Screen

This prompt will allow the admin to select four main categories which redirect the admin to

sub menus of the given categories.

Test Case Expected Result Actual Result Status

1 Press 1 for go to Add User

Screen

Go to Add User

screen

Goes to Add User

screen

OK

2 Press 2 for go to Update

Details Screen

Go to Update Details

screen

Goes to Update

Details screen

OK

3 Press 3 for go to Delete

Details Screen

Go to Delete Details

screen

Goes to Delete

Details screen

OK

4 Press 4 for go to Search

Details Screen

Go to Search Details

screen

Goes to Search

Details screen

OK

5 Press 0 to exit Go to Main Menu

screen

Goes to Main Menu

screen

OK

6 Wrong selection Show error message Shows error

message

OK

Table 3- Admin Menu Screen

Asia Pacific Institute of Information Technology Page 16

Page 17: C++ - Individual Assignment

Further Programming Concepts in C++

5.4 Doctor Menu Screen

This prompt will allow the doctor to perform the tasks he/she assigns to perform.

Test Case Expected Result Actual Result Status

1 Press 1 for go to Search

Assign Records Screen

Go to Search Assign

Records

Goes to Search

Assign Records

OK

2 Press 2 for go to Search

Patient Screen

Go to Search Patient

screen

Goes to Search

Patient screen

OK

3 Press 3 for go to Add

Diagnosis Details Screen

Go to Add Diagnosis

Details screen

Goes to Add

Diagnosis Details

screen

OK

4 Press 4 for go to View

Diagnosis Details Screen

Go to View

Diagnosis Details

screen

Goes to View

Diagnosis Details

screen

OK

5 Press 5 for go to Update

Diagnosis Details Screen

Go to Update

Diagnosis Details

Goes to Update

Diagnosis Details

OK

6 Press 6 for go to Delete

Diagnosis Details Screen

Go to Delete

Diagnosis Details

Goes to Delete

Diagnosis Details

OK

7 Press 0 to exit Go to Main Menu

screen

Goes to Main Menu

screen

OK

8 Wrong selection Show error message Shows error

message

OK

Table 4 – Doctor Menu Screen

Asia Pacific Institute of Information Technology Page 17

Page 18: C++ - Individual Assignment

Further Programming Concepts in C++

5. 5 Nurse Menu Screen

This prompt will appear when a nurse logs in to the system and it will allow him/her to search

the patient details and assign that patient to doctor.

Test Case Expected Result Actual Result Status

1 Press 1 for go to Search

Patient Screen

Go to Search Patient

screen

Goes to Search

Patient screen

OK

2 Press 1 for go to Search

Doctor Screen

Go to Search Doctor

screen

Goes to Search

Doctor screen

OK

3 Press 3 for go to Add

Diagnosis Details Screen

Go to Add Diagnosis

Details screen

Goes to Add

Diagnosis Details

screen

OK

4 Press 0 to exit Go to Main Menu

screen

Goes to Main Menu

screen

OK

5 Wrong selection Show error message Shows error

message

OK

Table 5 – Nurse Menu Screen

Asia Pacific Institute of Information Technology Page 18

Page 19: C++ - Individual Assignment

Further Programming Concepts in C++

5.6 Patient Menu Screen

After the patient log in to the system, he/she can view their diagnosis report and the payments

report.

Test Case Expected Result Actual Result Status

1 Press 1 for go to View

Diagnosis Screen

Go to View

Diagnosis screen

Goes to View

Diagnosis screen

OK

2 Press 2 for go to View

Payments Screen

Go to View Payments

screen

Goes to View

Payments screen

OK

3 Press 0 to exit Go to Main Menu

screen

Goes to Main Menu

screen

OK

4 Wrong selection Show error message Shows error

message

OK

Table 6 – Patient Menu Screen

5.7 Add User Menu Screen

This prompt will allow the administrator to move in to the sub menus which handles the

insertion of users such as administrators, doctors, nurses and patients.

Test Case Expected Result Actual Result Status

1 Press 1 for go to Add

Patient Screen

Go to Add Patient

Screen

Goes to Add Patient

Screen

OK

2 Press 2 for go to Add

Doctor Screen

Go to Add Doctor

Screen

Goes to Add Doctor

Screen

OK

3 Press 3 for go to Add

Nurse Screen

Go to Add Nurse

Screen

Goes to Add Nurse

Screen

OK

4 Press 4 for go to Add

Admin Screen

Go to Add Admin

Screen

Goes to Add Admin

Screen

OK

5 Press 0 to exit Go to Admin Menu Goes to Admin OK

Asia Pacific Institute of Information Technology Page 19

Page 20: C++ - Individual Assignment

Further Programming Concepts in C++

screen Menu screen

6 Wrong selection Show error message Shows error

message

OK

Table 7 – Add User Menu Screen

5.8 Update Details Menu Screen

This prompt will allow the administrator to move in to the sub menus which handles the

update process of patient details, doctor details, diagnosis records and payments records.

Test Case Expected Result Actual Result Status

1 Press 1 for go to Update

Patient Screen

Go to Update Patient

Screen

Goes to Update

Patient Screen

OK

2 Press 2 for go to Update

Doctor Screen

Go to Update Doctor

Screen

Goes to Update

Doctor Screen

OK

3 Press 3 for go to Update

Diagnosis Screen

Go to Update

Diagnosis Screen

Goes to Update

Diagnosis Screen

OK

4 Press 4 for go to Update

Payments Screen

Go to Update

Payments Screen

Goes to Update

Payments Screen

OK

5 Press 0 to exit Go to Admin Menu

screen

Goes to Admin

Menu screen

OK

6 Wrong selection Show error message Shows error

message

OK

Table 8 – Update Details Menu Screen

Asia Pacific Institute of Information Technology Page 20

Page 21: C++ - Individual Assignment

Further Programming Concepts in C++

5.9 Delete Details Menu Screen

This prompt will allow the administrator to move in to the sub menus which handles the

update process of patient details, doctor details, diagnosis records and payments records.

Test Case Expected Result Actual Result Status

1 Press 1 for go to Delete

Patient Screen

Go to Delete Patient

Screen

Goes to Delete

Patient Screen

OK

2 Press 2 for go to Delete

Doctor Screen

Go to Delete Doctor

Screen

Goes to Delete

Doctor Screen

OK

3 Press 3 for go to Delete

Nurse Screen

Go to Delete Nurse

Screen

Goes to Delete

Nurse Screen

OK

4 Press 4 for go to Delete

Diagnosis Screen

Go to Delete

Diagnosis Screen

Goes to Delete

Diagnosis Screen

OK

5 Press 5 for go to Delete

Payments Screen

Go to Delete

Payments Screen

Goes to Delete

Payments Screen

OK

6 Press 0 to exit Go to Admin Menu

screen

Goes to Admin

Menu screen

OK

7 Wrong selection Show error message Shows error

message

OK

Table 9 – Delete Details Menu Screen

Asia Pacific Institute of Information Technology Page 21

Page 22: C++ - Individual Assignment

Further Programming Concepts in C++

5.10 Search Details Menu Screen

Search details menu contains the functions of search doctor, diagnosis details and payments

details.

Test Case Expected Result Actual Result Status

1 Press 1 for go to Search

Doctor Screen

Go to Search Doctor

Screen

Goes to Search

Doctor Screen

OK

2 Press 2 for go to Search

Diagnosis Screen

Go to Search

Diagnosis screen

Goes to Search

Diagnosis screen

OK

3 Press 3 for go to Search

Payments Screen

Go to Search

Payments screen

Goes to Search

Payments screen

OK

4 Press 0 to exit Go to Admin Menu

screen

Goes to Admin

Menu screen

OK

5 Wrong selection Show error message Shows error

message

OK

Table 10 – Search Details Menu Screen

5.11 Search Assign Records Screen

This prompt will allow users to search an assignment detail of a patient to a doctor by using

patient id.

Test Case Expected Result Actual Result Status

1 Search Assign Records

Screen

Should take the user

input and show the

results

Takes the user input

and shows the

results

OK

2 Redirect to the appropriate

sub menu

Should redirect by

two clicks

Redirects by two

clicks

OK

Table 11 – Search Assign Records Screen

Asia Pacific Institute of Information Technology Page 22

Page 23: C++ - Individual Assignment

Further Programming Concepts in C++

5.12 Search Doctor Details Screen

This prompt will allow the user to search doctor details by using doctor id.

Test Case Expected Result Actual Result Status

1 Search Doctor Details

Screen

Should take the user

input and show the

results

Takes the user input

and shows the

results

OK

2 Redirect to the appropriate

sub menu

Should redirect by

two clicks

Redirects by two

clicks

OK

Table 12 – Search Doctor Details Screen

5.13 Search Diagnosis Details Screen

This prompt will allow the user to search diagnosis details of a patient by using the patient id.

Test Case Expected Result Actual Result Status

1 Search Diagnosis Details

Screen

Should take the user

input and show the

results

Takes the user input

and shows the

results

OK

2 Redirect to the appropriate

sub menu

Should redirect by

two clicks

Redirects by two

clicks

OK

Table 13 – Search Diagnosis Details Screen

Asia Pacific Institute of Information Technology Page 23

Page 24: C++ - Individual Assignment

Further Programming Concepts in C++

5.14 Search Payment Details Screen

This prompt will allow the user to search payment details of a patient by using the patient id.

Test Case Expected Result Actual Result Status

1 Search Payment Details

Screen

Should take the user

input and show the

results

Takes the user input

and shows the

results

OK

2 Redirect to the appropriate

sub menu

Should redirect by

two clicks

Redirects by two

clicks

OK

Table 14 – Search Payment Details Screen

5.15 Search Patient Details Screen

This prompt will allow the user to search patient details by using the patient id.

Test Case Expected Result Actual Result Status

1 Search Patient Details

Screen

Should take the user

input and show the

results

Takes the user input

and shows the

results

OK

2 Redirect to the appropriate

sub menu

Should redirect by

two clicks

Redirects by two

clicks

OK

Table 15 – Search Patient Details Screen

Asia Pacific Institute of Information Technology Page 24

Page 25: C++ - Individual Assignment

Further Programming Concepts in C++

5.16 Update Patient Details Screen

Users can update selected patient details by using patient id in this prompt.

Test Case Expected Result Actual Result Status

1 Press 1 for Update Name

prompt

Should appear

Update Name prompt

and accept user input

Appears Update

Name prompt and

accepts user input

OK

2 Press 2 for Update NIC

prompt

Should appear

Update NIC prompt

and accept user input

Appears Update NIC

prompt and accepts

user input

OK

3 Press 3 for Update Gender

prompt

Should appear

Update Gender

prompt and accept

user input

Appears Update

Gender prompt and

accepts user input

OK

4 Press 4 for Update YOB

prompt

Should appear

Update YOB prompt

and accept user input

Appears Update

YOB prompt and

accepts user input

OK

5 Press 5 for Update

Nationality prompt

Should appear

Update Nationality

prompt and accept

user input

Appears Update

Nationality prompt

and accepts user

input

OK

6 Press 6 for Update

Password prompt

Should appear

Update Password

prompt and accept

user input

Appears Update

Password prompt

and accepts user

input

OK

7 Press 7 for Update Allergy

prompt

Should appear

Update Allergy

prompt and accept

user input

Appears Update

Allergy prompt and

accepts user input

OK

8 Press 8 for Save the Details

prompt

Should save the

details

Save the details OK

9 Press 9 for Show updated Should show updated Show updated OK

Asia Pacific Institute of Information Technology Page 25

Page 26: C++ - Individual Assignment

Further Programming Concepts in C++

Details prompt details details

10 Press 0 to exit Go to appropriate sub

menu screen

Goes to appropriate

sub menu screen

OK

11 Wrong selection Show error message Shows error

message

OK

Table 16 - Update Patient Details Screen

5.17 Update Doctor Details Screen

Users can update selected doctor details by using doctor id in this prompt.

Test Case Expected Result Actual Result Status

1 Press 1 for Update Name

prompt

Should appear

Update Name prompt

and accept user input

Appears Update

Name prompt and

accepts user input

OK

2 Press 2 for Update

Specialized Area prompt

Should appear

Update Specialized

Area prompt and

accept user input

Appears Update

Specialized Area

prompt and accepts

user input

OK

3 Press 3 for Update Contact

No prompt

Should appear

Update Contact No

prompt and accept

user input

Appears Update

Contact No prompt

and accepts user

input

OK

4 Press 4 for Update

Password prompt

Should appear

Update Password

prompt and accept

user input

Appears Update

Password prompt

and accepts user

input

OK

5 Press 5 for Save the Details

prompt

Should save the

details

Save the details OK

6 Press 6 for Show updated

Details prompt

Should show updated

details

Show updated

details

OK

7 Press 0 to exit Go to appropriate sub Goes to appropriate OK

Asia Pacific Institute of Information Technology Page 26

Page 27: C++ - Individual Assignment

Further Programming Concepts in C++

menu screen sub menu screen

8 Wrong selection Show error message Shows error

message

OK

Table 17 - Update Doctor Details Screen

Asia Pacific Institute of Information Technology Page 27

Page 28: C++ - Individual Assignment

Further Programming Concepts in C++

5.18 Update Diagnosis Details Screen

Users can update selected diagnosis details of a patient by using patient id in this prompt.

Test Case Expected Result Actual Result Status

1 Press 1 for Update Illness

prompt

Should appear

Update Illness

prompt and accept

user input

Appears Update

Illness prompt and

accepts user input

OK

2 Press 2 for Update

Treatment prompt

Should appear

Update Treatment

prompt and accept

user input

Appears Update

Treatment prompt

and accepts user

input

OK

3 Press 3 for Update Drugs

prompt

Should appear

Update Drugs prompt

and accept user input

Appears Update

Drugs prompt and

accepts user input

OK

4 Press 5 for Save the Details

prompt

Should save the

details

Save the details OK

5 Press 6 for Show updated

Details prompt

Should show updated

details

Show updated

details

OK

6 Press 0 to exit Go to appropriate sub

menu screen

Goes to appropriate

sub menu screen

OK

7 Wrong selection Show error message Shows error

message

OK

Table 18 – Update Diagnosis Details Screen

Asia Pacific Institute of Information Technology Page 28

Page 29: C++ - Individual Assignment

Further Programming Concepts in C++

5.19 Update Payments Details Screen

Users can update selected payment details of a patient by using patient id in this prompt.

Test Case Expected Result Actual Result Status

1 Press 1 for Update Patient

Name prompt

Should appear

Update Patient Name

prompt and accept

user input

Appears Update

Patient Name

prompt and accepts

user input

OK

2 Press 2 for Update Amount

prompt

Should appear

Update Amount

prompt and accept

user input

Appears Update

Amount prompt and

accepts user input

OK

3 Press 3 for Update Status

prompt

Should appear

Update Status prompt

and accept user input

Appears Update

Drugs Status and

accepts user input

OK

4 Press 5 for Save the Details

prompt

Should save the

details

Save the details OK

5 Press 6 for Show updated

Details prompt

Should show updated

details

Show updated

details

OK

6 Press 0 to exit Go to appropriate sub

menu screen

Goes to appropriate

sub menu screen

OK

7 Wrong selection Show error message Shows error

message

OK

Table 19 – Update Payments Details Screen

Asia Pacific Institute of Information Technology Page 29

Page 30: C++ - Individual Assignment

Further Programming Concepts in C++

5.20 Delete Assign Records Screen

This prompt will allow users to search an assignment detail of a patient to a doctor by using

patient id and allows it to be deleted.

Test Case Expected Result Actual Result Status

1 Search Assign Records Should take the user

input and request to

delete the results

Takes the user input

and requests to

delete the results

OK

2 Press 1 for Delete Should delete the

record

Deletes the record OK

3 Press 0 for Cancel Should redirect to the

appropriate sub menu

Redirects to the

appropriate sub

menu

OK

Table 20 – Delete Assign Records Screen

5.21 Delete Diagnosis Records Screen

This prompt will allow users to search a diagnosis detail of a patient by using patient id and

allows it to be deleted.

Test Case Expected Result Actual Result Status

1 Search Diagnosis Records Should take the user

input and request to

delete the results

Takes the user input

and requests to

delete the results

OK

2 Press 1 for Delete Should delete the

record

Deletes the record OK

3 Press 0 for Cancel Should redirect to the

appropriate sub menu

Redirects to the

appropriate sub

menu

OK

Asia Pacific Institute of Information Technology Page 30

Page 31: C++ - Individual Assignment

Further Programming Concepts in C++

Table 21 – Delete Diagnosis Records Screen

5.22 Delete Patient Details Screen

This prompt will allow users to search a patient by using patient id and allows deleting the

record.

Test Case Expected Result Actual Result Status

1 Search Patient Details Should take the user

input and request to

delete the results

Takes the user input

and requests to

delete the results

OK

2 Press 1 for Delete Should delete the

record

Deletes the record OK

3 Press 0 for Cancel Should redirect to the

appropriate sub menu

Redirects to the

appropriate sub

menu

OK

Table 22 – Delete Patient Details Screen

5.23 Delete Payment Details Screen

This prompt will allow users to search a payment detail by using patient id and allows

deleting the record.

Test Case Expected Result Actual Result Status

1 Search Payment Details Should take the user

input and request to

delete the results

Takes the user input

and requests to

delete the results

OK

2 Press 1 for Delete Should delete the

record

Deletes the record OK

3 Press 0 for Cancel Should redirect to the

appropriate sub menu

Redirects to the

appropriate sub

OK

Asia Pacific Institute of Information Technology Page 31

Page 32: C++ - Individual Assignment

Further Programming Concepts in C++

menu

Table 23 – Delete Payment Details Screen

5.24 Delete Doctor Details Screen

This prompt will allow users to search a doctor by using doctor id and allows deleting the

record.

Test Case Expected Result Actual Result Status

1 Search Doctor Details Should take the user

input and request to

delete the results

Takes the user input

and requests to

delete the results

OK

2 Press 1 for Delete Should delete the

record

Deletes the record OK

3 Press 0 for Cancel Should redirect to the

appropriate sub menu

Redirects to the

appropriate sub

menu

OK

Table 24 – Delete Doctor Details Screen

5.25 Delete Nurse Details Screen

This prompt will allow users to search a nurse by using nurse id and allows deleting the

record.

Test Case Expected Result Actual Result Status

1 Search Nurse Details Should take the user

input and request to

delete the results

Takes the user input

and requests to

delete the results

OK

2 Press 1 for Delete Should delete the

record

Deletes the record OK

3 Press 0 for Cancel Should redirect to the Redirects to the OK

Asia Pacific Institute of Information Technology Page 32

Page 33: C++ - Individual Assignment

Further Programming Concepts in C++

appropriate sub menu appropriate sub

menu

Table 25 – Delete Nurse Details Screen

6.0 Conclusion

Further Programming Concepts in C++ is one of the best ways to work and to have great

practices in object oriented programming concepts. Nowadays, object oriented programming

concepts are the most preferable and commonly use concepts in IT industry. By involving to

the Further Programming Concepts in C++ lectures and to the assignment which guided me

to develop a Patient Handling System, gave me a better picture about the C++ language and

object oriented concepts.

In my Win32 console application, I was able to add object oriented concepts which helped

me a lot to make this application a success. Limitations of the system are considered as

further development section. But developing a Win32 console application using C++ helped

me to improve my knowledge in C++ programming language and object oriented

programming concepts.

Asia Pacific Institute of Information Technology Page 33

Page 34: C++ - Individual Assignment

Further Programming Concepts in C++

6.0 References

Exforsys Inc.(2000-2010). C++ Encapsulation. [Online]. Available from:

http://www.exforsys.com/tutorials/c-plus-plus/encapsulation--an-introduction.html.

[Accessed: 22nd October 2010].

Balagurusamy, E.(ed.)(2008). Object oriented programming with C++: 4th Edition. McGraw-

Hill companies: McGraw-Hill.

Bjarne Stroustrup.(ed.)(2004). The C++ Programming Language: 3rd Edition. Pearson

Education.

Asia Pacific Institute of Information Technology Page 34