+ All Categories

thesis

Date post: 24-Nov-2014
Category:
Upload: belal-mohammad
View: 310 times
Download: 0 times
Share this document with a friend
Popular Tags:
61
1 Dissertation Report WILDLIFE CONSERAVATION MANAGEMENT SYSTEM A Report submitted In partial fulfillment of the award of the degree of B.C.A Session 2007-2010 Submitted by: ARIBA NAJIB 2007-301-027 Under the guidance of Mrs.Farheen Siddiqui (Assistant Professor) Faculty of Computer Science Department of Computer Science JAMIA HAMDARD New Delhi
Transcript
Page 1: thesis

1

Dissertation Report

WILDLIFE CONSERAVATION MANAGEMENT SYSTEM A Report submitted In partial fulfillment of the award of the degree of

B.C.A Session 2007-2010

Submitted by:

ARIBA NAJIB

2007-301-027

Under the guidance of

Mrs.Farheen Siddiqui

(Assistant Professor)

Faculty of Computer Science

Department of Computer Science

JAMIA HAMDARD

New Delhi

Page 2: thesis

2

DECLARATION

I hereby declare that the minor project work entitled WILDLIFE

CONSERVATION MANAGEMENT SYSTEM submitted for the BCA (3yrs

course) is my original work carried out by me under the guidance of Mrs.Farheen

Siddiqui for the partial fulfillment of the award of the degree of the Bachelor

of Computer Applications. The matter embodied in this report has not been submitted

anywhere else for the award of any other degree/diploma.

Place: New Delhi.

Date: 15th

April 2010

Signature of the candidate

Page 3: thesis

3

`

ACKNOWLEDGEMENT

I would like to thanks to all my guides who really acted as pillars to help my way

throughout this project that has led to successful and satisfactory completion of this

project.

Firstly I would like to thank my project incharge Mrs.Farheen Siddiqui under whose

able guidance and motivation this work has been performed.

The inspiration of the faculty members of the Computer Science Department of

JAMIA HAMDARD enabled me to make a thorough study of this subject.

NAME -Ariba Najib

ENROLL.NO. - 2007-301-010

Page 4: thesis

4

ABSTRACT

The project, WILDLIFE CONSERVATION MANAGEMENT SYSTEM ,deals

basically with the information about endangered and non-endangered species of birds

and animals living in sanctuaries and national parks respectively. It thus helps in

creating awareness about the endangered fauna in India. The complete information

about various animals is available at the click of the mouse via this project. The

project also helps in adding, modifying, deleting and displaying records related to

animals and birds categorized either as endangered or non-endangered species. Each

record of the particular bird or animal contains entire information and details

including its name, cell ID where it is being kept, zoo keeper’s name and likewise.

The proposed system can manage all drawbacks of the existing manual system.

Page 5: thesis

5

Sno. Table of Contents Page

No.

1

2

List of Abbreviations

List of figures

6

7

3

List of tables

8

4

Introduction

9

5 Objective

10

6 Problem Selection 11

7 System Study

12

8 Cost Benefit

8.1 benefit category

14

15

9 Project monitoring System

9.1 PERT Chart

9.2 Actual Process

16

17

18

10

System Design

10.1 Data Flow Diagram

10.2 E.R.Diagram

10.3 Data Dictionary

10.4 Tools to be used

19

20

23

25

27

11

Documentation

28

12

Output

42

13

System Testing

49

14

Implementation

52

15 Conclusion 53

16 Scope 54

17 References 55

Page 6: thesis

6

Sno.

Abbreviations Word

1 Rec Records

2 RA Requirement Analysis

3 Ackn Acknowledgment

4 Prg Programs

5 H/w Hardware

6 S/w Software

List of Abbreviations

Page 7: thesis

7

List of Figures

S.No. Table No. Description of table Page No.

1. 10.1.1 Context level diagram of wildlife

conservation management system

21

2. 10.1.2 Level 1 DFD for Process 1.0 22

3. 10.2 Entity-Relationship

Diagram

24

Page 8: thesis

8

List of Tables

s.no. Table no. Description of table Pageno.

1. 10.2.1 ZOO_DB1.DAT 26

2. 10.2.2 ZOO_DB2.DAT 26

Page 9: thesis

9

INTRODUCTION

Today, IT industry is an industry which brings changes in the working environment

of our society in a convenient and efficient way. IT industry is flourishing and has its

scope in relatively all the fields. We are in an era of change and can do away with all

the obstacles of the current prevailing system. While studying and analyzing the

working of this system, there were many problems that occurred. These problems are:

Manual system is a time consuming system, i.e. manual system takes a large

amount of time for processing queries generated by the user.

There is a possibility of duplicity of data in manual system. Due to this, there is

also a possibility of inconsistency.

Manual system is difficult to operate.

It is more costly.

It uses more man power.

Page 10: thesis

10

OBJECTIVES OF THE PROJECT

The main objective of the WILDLIFE CONSERVATION MANAGEMENT

SYSTEM is to perform all the functions or operations accurately and correctly. It

overcomes all the problems that we have in our existing system. Our existing system

is as follows:

Duplication of data: - Duplication of data means that the same record was

repeated a number of times. Due to this, our database becomes lengthy and

difficult to maintain. If there is duplication of data, then there is a possibility

of inconsistency of data. Due to the above problem, it is very difficult to

handle the database

Update Problem:- The updation problem is further categorized into three

category:-

Insertion Problem: - . It doesn’t enforce any constraint over the user while

inputting data in the table. The user may enter irrelevant, false information in

the table. That result inaccuracy, inconsistency of record. In our new

computerized record keeping system, domains are specified that enforces the

user to input valid data. For example, the user can enter the incorrect data in

the table, which may lead to irrelevant or false data.

Manipulation Problem: - In the existing system, there is a possibility of

duplication of records. The manipulation of record is successful if it is done to

all the duplicate records. For example, if a record is entered in the table twice,

and there is only one record is updated and then there is a problem in query

handling.

Deletion problem: - If a product data is to be

deleted from the database and if the table has duplicate records than the entire

duplicate records have to be deleted and the practical implementation of this is

not possible.

Apart from the duplication and updation problem, there is another problem

which is that our existing system is very slow. The process of inserting,

updating or deleting of records is limited to the speed of operator. And

maintaining registers or papers is very difficult, there is need of extra storage

space and person who maintains the registers of records. There are more

chances of losing the records during handling them.

Page 11: thesis

11

PROBLEM SELECTION

The existing system in the companies is manual where all the work is done manually

by entering the records in the various files and folders.

Maintaining these files requires a lot of space as well as lot of man power. Also there

is a possibility of duplicacy of data and data inconsistency.

Therefore the requirements of the project are as follows:

Greater storage capacity.

Greater processing speed of input and output operations

More reliable and consistent procedure to eliminate errors in handling day to

day processing.

Page 12: thesis

12

SYSTEM STUDY

System Study is to measure that how beneficial or practical the development of an

information system will be to an organization. It is also known as the Feasibility

study.

FEASIBILITY STUDY

A feasibility study is undertaken to determine the possibility of either improving the

existing system or developing a completely new system. This study helps to obtain an

overview of the problem and to get rough assessment of whether feasible solutions

exist. Since the feasibility study may lead to the commitment of large resources, it is

important that it is conducted completely and that no fundamental errors of judgement

are made.

The purpose of feasibility study is to determine whether the

requested project is successfully realizable. There are three aspects of feasibility

study, namely

(a) Technical feasibility

(b) Economic feasibility

(c) Operational feasibility

Operational feasibility Operational feasibility must determines how the proposed system will fit in with

the current operations and what, if any, job restructuring and retraining will be

needed to implement the system.

The analyst should determine:

Whether the system can be used if it is developed and

implemented?

Will there be resistance from users that will cripple the possible

application benefit?

How well the solution will work and how the end-users and staff members

feel about the system. This people oriented test measures the urgency of

the problem or the acceptability of a solution i.e. Is the problem worth

solving?

PIECE is used as the basis for analyzing the urgency of problem or the effectiveness

of a solution.

PIECE stands for:

P – Performance

I – Information

E – Economics

C – Control

E – Efficiency

Page 13: thesis

13

Technical feasibility The purpose of assessing technical feasibility is to gain an understanding of the

organization’s ability to construct the proposed system. Technical feasibility

determines whether the technology needed for the proposed system is available and

how it can be integrated with in the organization. Technical evaluation must also

assess whether the staff have the technical expertise to assimilate and use the new

technology.

Whether the project can be carried out with the existing equipments?

The existing system is manual system where all the work is done

manually. So this project is new technology.

The technical feasibility centers on the existing computer system and to what extent it

can support the proposed system.

Economic feasibility The purpose of assessing economic feasibility is to identify the financial benefits and

costs associated with the development project. Economic feasibility is often known as

cost-benefits analysis.

To carry out an economic feasibility study, it is necessary to estimate

actual money values against any purchase or activities needed to implement the

project. It is also necessary to assess money value against any benefits that will

accrue from a new system created by the project.

There are mainly two categories/analysis to determine economic feasibility: -

Cost category

Benefit category

Page 14: thesis

14

COST-BENEFITS ANALYSIS

Cost Categories

Equipment cost It includes various items of computing equipment associated with

the work.

Operating cost It includes the expense to run the system. Operating cost depends

on the amount of time taken for a process i.e., it includes the cost

associated with the day to day operation of the system.

Personnel cost It includes the salaries and wages of analyst, programmers,

operators, consultants etc. Salary may be on hourly basis or the

entire salary for the duration of the project.

Material cost It includes cost of stationary, paper, ribbons, floppies, CD’s etc.

Conversion cost It includes that of designing new forms and procedures,

expenditure to prepare the project for using the new system.

Page 15: thesis

15

Benefit Categories

Performance The criteria emphasize whether the new system has resulted in a

marked improvement in the accuracy in access to information.

Does the new system provide easier and secure access to the

authorized user.

Minimizing cost If the new system is efficient with minimum error, reduction of

staff is a benefit that should be measured and included in cost

benefit analysis

Page 16: thesis

16

PROJECT MONITORING SYSTEM

PERT CHART: -

A PERT chart is a project management tool used to schedule, organize, and

coordinate tasks within a project. PERT stands for Program Evaluation Review

Technique. A PERT chart presents a graphic illustration of a project as a network

diagram consisting of numbered nodes (either circles or rectangles) representing

events, or milestones in the project linked by labeled vectors (directional lines)

representing tasks in the project.

The direction of the arrows on the lines indicates the sequence of tasks.

Arrow is used to represents task.

Circle represents the beginning or completion of task.

The PERT chart process includes following steps: -

1) Identifies the specific activitiy and milestone.

2) Determine the proper sequence of the activities.

3) Construct a network diagram.

4) Estimate the time required for each activity.

5) Determine the critical path.

6) Update the PERT chart as the process progresses.

Page 17: thesis

17

PERT CHART

Problem Feasibility

Definition 2 study

3

System analyze

5

Flow chart DFD

4

3

Data Dictionary

2

Coding

2

I

Testing 30

Figure 6.2: - PERT chart

1 2

3

4

6

5

7

8

Page 18: thesis

18

Actual Process

S.No Phase Time Estimate in days Actual Time

1. Problem Definition 1 4

2. Feasibility study 5 5

3.

3.1.

3.2.

3.3.

3.4.

System analysis and design

Flow Chart

DFD

Data Dictionary

Complete documentation

3

2

1

10

3

6

2

11

4. Coding 35 7

5. Testing 3 4

Total Number of Hours= 60days* 5 hours

= 300 hrs.

PERT Process

Page 19: thesis

19

Software and Hardware Requirement Specification

Hardware: -

Intel Pentium III processor

Minimum 32MB RAM

Recommended 256 MB RAM

Minimum hard disk 2GB

Software: -

Windows operating system

C complier compatible with the Windows OS

Page 20: thesis

20

SYSTEM DESIGN

In the system design process, the primary objective is to identify user requirements

and to build a system that satisfies these requirements. Basically, the design phase

concentrates on “how” the system is developed. Design describes a final system and

the process by which it is developed. It refers to the technical specification that will

apply in implementing the candidate system. The design phase is the second

important steps in the system development life cycle. During this phase the analyst

does the following:

Schedules design activities.

Works with the user to determine the different data inputs to the system.

Draws the model of new system, using data flow diagram & entity-

relationship diagrams.

Defines the data requirements with a data dictionary.

Writes program specifications.

Identifies and orders any hardware and software that the system design phase would

need.

Page 21: thesis

21

DATA FLOW DIAGRAMS

Data flow diagrams provide a logical model of the system and show the flow of data and

the flow of logic involved. The Data Flow Diagram (DFD) clarifies system requirements

and identifies major transformations that will become programs in system design. With

only four symbols, you can use data flow diagrams to represent both physical and logical

information systems. Data flow diagrams (DFD’s) are not as good as flowcharts for not

very useful for depicting purely logical information flows. In fact, flowcharting has been

criticized by proponents of structured analysis and structured design because it is too

physically oriented. Data flow diagram shows how data travels from one point to another

point in the diagram. The flow is shown as an arrowed line with the arrowhead showing the

direction of flow.

The data flow is given a simple and meaningful descriptive name . The data flow may

move from an external entity to a process, from one process to another process and from

one process to external entity. The Data Flow Diagram (DFD) clarifies system

requirements and identifies major transformations that will become programs in system

design. It is the starting point of system design that decomposes the requirements

specifications down to the lowest level of detail.

Page 22: thesis

22

Page 23: thesis

23

1 LEVEL DFD

Page 24: thesis

24

ENTITY-RELATIONSHIP DIAGRAM

The other tool for problem analysis is the Entity-Relationship Diagram, often called as ER

Diagram. It is a detailed logical representation of the data for an organization and uses

three main constructs, i.e. Data Entities, Relationships and their Associated Attributes.

1. Entities: - An entity is a person, place, thing or event of interest to the organization

and about which data are captured, stored or processed. For example, an employee

is an entity.

2. Relationship: - An association of several entities in a entity-relation model is called

relationship.

3. Attributes: Each entity type has a set of attributes associates with it. An attribute is

a property of characteristics of an entity that is of interest to the organization. We

use an initial Capital Letters, followed by Lowercase Letters in naming an attribute

Page 25: thesis

25

species

Species

Endangered

species

Non Endangered

species

Cellid

Keeper_nm

An_ sex

anim_age

IS-A

anim_

history An_name

s_type

num_of_offspring

E.R.DIAGRAM

Page 26: thesis

26

DATA DICTIONARY

A data dictionary is a set of metadata which contains the definition and representation of

data elements. From the perspective of a database management system, a data dictionary is

a set of table and views which can only be read and never altered.

Most data dictionaries contain different information about the data used in the enterprise. In

terms of the database representation of the data, the data table defines all schema objects

including views, tables, clusters, indexes, sequences, synonyms, procedures, packages,

functions, triggers and many more. This will ensure that all these things follow one

standard defined in the dictionary. The data dictionary also defines how much space has

been allocated for and / or currently in used by all the schema objects.

Simply putting data dictionary (DD) is data about data. It is a Centralized collection of

definitions of all data flowing among functions and to or from data stores. Data dictionary

removes redundancy and inconsistencies. The Data Dictionary for the current system is

given below:

The proposed WILDLIFE CONSERVATION MANAGEMENT SYSTEM is designed in

the next stage following the DFDs and the DD.

Page 27: thesis

27

ZOO_DB1.DAT : ZOO_DB2.DAT

Column name Data

type

length

anim_history char

50

an_name char

30

keeper_nm char

20

an_sex

char 2

anim_age

int 2

num_of_offsprings

int 2

Cellid

int

4

S_type char 20

Column name Data

type

Length

anim_history char 50

an_name char 30

keeper_nm char 20

an_sex char 2

anim_age Int 2

num_of_offsprings Int 2

cellid Int 4

s_type char 20

Page 28: thesis

28

Tools/Platform, Languages to be used

Operating System :WINDOWS VISTA : Windows XP

Languages :C Programming compatible with OS : C Programming

BackHand :RDBMS : MS Access

Application :multi-User Interactive With RDBMS

Data dictionaries should not be confused with data models because the latter usually

include more complex relationships between elements of data.

Page 29: thesis

29

CODING

//Include Header Files

#include <stdio.h> //standard input output

#include <conio.h> //console input output

#include <dos.h> //for all screen related functions

#include <stdlib.h> //for exit function

#include <string.h> //for string related functions

//The name of file which stores the information about the ZOO Animals

#define ZOO_MGMT_FILE_1 "ZOO_DB1.DAT"

#define ZOO_MGMT_FILE_2 "ZOO_DB2.DAT"

#define TEMP_FILE "TEMP.DAT"

#define _OPT_ONE 1

#define _OPT_TWO 2

#define _OPT_THREE 3

#define _CELL_ID_SIZE 4

#define _ANIM_NAME_SIZE 30

#define _ANIM_HIST_SIZE 50

#define _KEEPER_NAME_SIZE 20

struct ZooAnimal

{

char

anim_history[_ANIM_HIST_SIZE],

an_name[_ANIM_NAME_SIZE],

keeper_nm[_KEEPER_NAME_SIZE],

cellid[_CELL_ID_SIZE],

s_type[_KEEPER_NAME_SIZE],

an_sex[_OPT_TWO];

int anim_age,

num_of_offsprings;

};

/*

//All the Function Prototypes

//Actually not required since all the functions are declared before main

void DisplayMainMenu(void);

void DisplayWildMgmtSystemMenu(void);

Page 30: thesis

30

void ExitTheSystem(void);

void AddAnimal2DB(FILE *fp);

void DisplayAnimalInfo(FILE *fp, int iUserMenuChoice);

void ModifyAnimalInfo(FILE *fp);

void DeleteAnimalInfo(FILE *fp, int iUserMenuChoice);

*/

//================================================================

=============

//Function Name DisplayMainMenu()

//

//Description This function Displays the main menu

//

//Parameter NONE

//

//================================================================

=============

void DisplayMainMenu(void)

{

clrscr();

/* To Display Main menu */

gotoxy(26,40);

textcolor(9);

cprintf("WILDLIFE CONSERVATION MANAGEMENT SYSTEM ");

gotoxy(8,45);

textcolor(9);

/* To Display date and time */

cprintf("DATE : %s ",__DATE__);

gotoxy(55,45);

textcolor(9);

cprintf("TIME : %s ",__TIME__);

gotoxy(30,8);

textcolor(9);

/* Main menu */

cprintf("WILDLIFE CONSERVATION MANAGEMENT SYSTEM");

gotoxy(30,10);

textcolor(19);

cprintf("1.ENDANGERED SPECIES CONSERVATION SYSTEM");

gotoxy(30,12);

cprintf("2.NON ENDANGERED SPECIES SUPPORT SYSTEM");

gotoxy(30,14);

cprintf("3.EXIT");

} //DisplayMainMenu

//================================================================

=============

Page 31: thesis

31

//Function Name DisplayWildMgmtSystemMenu()

//

//Description This function display the operation of Wild Mgmt System

//

//Parameter NONE

//

//================================================================

=============

void DisplayWildMgmtSystemMenu(void)

{

gotoxy(23,42);

textcolor(19);

cprintf("WILDLIFE CONSERVATION MANAGEMENT SYSTEM");

gotoxy(8,45);

textcolor(4);

cprintf("DATE : %s ",__DATE__);

gotoxy(55,45);

cprintf("TIME : %s ",__TIME__);

gotoxy(30,10);

textcolor(19);

cprintf("1.ADD ");

gotoxy(30,12);

cprintf("2.DISPLAY");

gotoxy(30,14);

cprintf("3.MODIFY");

gotoxy(30,16);

cprintf("4.DELETE");

gotoxy(30,18);

cprintf("5.EXIT");

} //DisplayWildMgmtSystemMenu

//================================================================

=============

//Function Name ExitTheSystem()

//

//Description This function simply exit the system using exit function

//

//Parameter NONE

//

//================================================================

=============

void ExitTheSystem(void)

{

/* To exit from the system */

gotoxy(30,28);

textcolor(4);

Page 32: thesis

32

cprintf("SYSTEM SHUTTING DOWN");

sleep(3);

gotoxy(8,42);

printf("WILDLIFE CONSERVATION MANAGEMENT SYSTEM");

exit(0);

} //ExitTheSystem

//================================================================

=============

//Function Name AddAnimal2DB()

//

//Description This function add the animal info to file

//

//Parameter File Pointer

//

//================================================================

=============

void AddAnimal2DB(FILE *fp)

{

struct ZooAnimal animal_info;

int record_size = sizeof(animal_info);

char cell_id[_CELL_ID_SIZE] = {0}; //init with null

int isvalid = 0;

//To add a record

LBL_CELL_ID:

printf("\n\n\n\t\tENTER CELL ID( 3 DIGIT NO.): ");

scanf("%3s",cell_id);

rewind(fp);

//Checking for unique id

while(fread(&animal_info, record_size, 1, fp)==1)

{

if(strcmp(animal_info.cellid,cell_id)==0)

{

textcolor(4);

printf("\n\t\tTHE CELL ID ALREADY EXISTS!!!!!\n");

goto LBL_CELL_ID;

} //ig

} //while

if (fread(&animal_info,record_size,1,fp)==0)

{

//Take the File Pointer to the end of the file

fseek (fp,0,SEEK_END);

Page 33: thesis

33

//Copy the Input cell id to animal info

strcpy(animal_info.cellid,cell_id);

LBL_KEEPER_NAME:

printf("\n\t\tENTER KEEPER'S NAME: ");

scanf("%s",animal_info.keeper_nm);

LBL_ANML_NAME:

printf("\n\t\tENTER ANIMAL NAME : ");

scanf("%s",animal_info.an_name);

if(strlen(animal_info.an_name)>30 || strlen(animal_info.an_name)<3)

goto LBL_ANML_NAME;

LBL_S_TYPE:

printf("\n\t\tENTER SPECIES TYPE : ");

scanf("%s",animal_info.s_type);

if(strlen(animal_info.s_type)>20 || strlen(animal_info.s_type)<3)

goto LBL_S_TYPE;

LBL_ANML_SEX:

while (isvalid != 1)

{

char dump;

printf("\n\t\tENTER SEX [M/F] : ");

isvalid = scanf("%[M,F,m,f]", animal_info.an_sex);

while((dump = getchar()) != '\n' && dump != EOF)

{

}

}

// if(strlen(animal_info.an_sex)>1)

// goto LBL_ANML_SEX;

LBL_ANML_AGE:

printf("\n\t\tENTER ANIMAL AGE : ");

scanf("%d",&animal_info.anim_age);

if(animal_info.anim_age<0||animal_info.anim_age>100)

goto LBL_ANML_AGE;

LBL_ANML_CHILD:

printf("\n\t\tENTER NO. OF OFFSPRING: ");

scanf("%d",&animal_info.num_of_offsprings);

Page 34: thesis

34

LBL_ANML_DETAILS:

printf("\n\t\tANIMAL DETAILS(IF ANY)\n\t\t(Don't leave space,use '_'): ");

scanf("%s",animal_info.anim_history);

if(strlen(animal_info.anim_history)>50)

goto LBL_ANML_DETAILS;

//Write the input information to the file

fwrite(&animal_info,record_size,1,fp);

/*Flushes a stream On success returns 0 , On error returns EOF */

fflush(stdin);

} //if

} //AddAnimal2DB

//================================================================

=============

//Function Name DisplayAnimalInfo()

//

//Description This function display the animal info from the file

//

//Parameter File Pointer and user choice

//

//================================================================

=============

void DisplayAnimalInfo(FILE *fp, int iUserMenuChoice)

{

struct ZooAnimal animal_info;

int record_size = sizeof(animal_info);

char cell_id[_CELL_ID_SIZE] = {0}; //init with null

int isExists = 0;

//Searching and displaying all the information by id

textcolor(7);

printf("\n\n\n\t\tENTER CELL ID: ");

scanf("%s",cell_id);

rewind(fp);

while(fread(&animal_info,record_size,1,fp)!=0)

{

if(strcmp(animal_info.cellid,cell_id)==0)

{

isExists = 1;

clrscr();

//Display according to Main menu

gotoxy(0,20);

Page 35: thesis

35

//ENDANGERED SPECIES CONSERVATION CONSERVATION

if(iUserMenuChoice == _OPT_ONE)

{

printf("\n\n\n\t\tDETAILS OF ANIMAL/BIRD:%s",strupr(animal_info.an_name));

printf("\n__________________________________________________________________

___\n\n");

printf("\n\n CELL ID : %s\n KEEPER's NAME : %s\n ANIMAL's NAME : %s\nSPECIES

TYPE:%s\n ANIMAL's SEX: %s\n ANIMAL's AGE : %d \n OFFSPRING NO. : %d\n\n

ANIMAL/BIRD DETAILS: %s",

strupr(animal_info.cellid),strupr(animal_info.keeper_nm),strupr(animal_info.an_name),str

upr(animal_info.s_type),strupr(animal_info.an_sex),animal_info.anim_age,animal_info.nu

m_of_offsprings,strupr(animal_info.anim_history));

printf("\n__________________________________________________________________

___\n\n");

}

//NON ENDANGERED SPECIES SUPPORT SYSTEM

else if(iUserMenuChoice == _OPT_TWO)

{

printf("\n\n\n\t\tDETAILS OF ANIMAL/BIRD:%s",strupr(animal_info.an_name));

printf("\n__________________________________________________________________

___\n\n");

printf("\n\n NAME : %s\t\n\n CELL ID : %s\tSPECIES TYPE :%s\t\n\n KEEPER'S

NAME : %s\n\n AGE: %d\t \n\nSEX : %s \t \n\nOFFSPRING NO. : %d\n\n ANIMAL

DETAILS: %s",

strupr(animal_info.an_name),strupr(animal_info.s_type),strupr(animal_info.cellid),strupr(a

nimal_info.keeper_nm),animal_info.anim_age,strupr(animal_info.an_sex),animal_info.nu

m_of_offsprings,strupr(animal_info.anim_history));

printf("\n__________________________________________________________________

___\n\n");

} //else-if

} //if

} //while

if (isExists == 0)

{

printf("\n\t\tRECORD DOESN'T EXISTS..");

} //if

getch();

} //DisplayAnimalInfo

//================================================================

=============

//Function Name ModifyAnimalInfo()

//

Page 36: thesis

36

//Description This function updates the animal info in the file

//

//Parameter File Pointer

//

//================================================================

=============

void ModifyAnimalInfo(FILE *fp)

{

struct ZooAnimal animal_info;

int record_size = sizeof(animal_info);

char cell_id[_CELL_ID_SIZE] = {0}; //init with null

char cAns = 'y';

//Searching and modifying Records by id

while(cAns == 'y' || cAns == 'Y')

{

printf("\n\n\n\t\tENTER CELL ID: ");

scanf("%s", cell_id);

rewind(fp);

while(fread(&animal_info, record_size, 1, fp)==1)

{

if(strcmp(animal_info.cellid, cell_id)==0)

{

LBL_ANML_NAME:

printf("\n\n\t\tENTER ANIMAL NAME: %s : ",strupr(animal_info.an_name));

scanf("%s",animal_info.an_name);

if(strlen(animal_info.an_name)>20||strlen(animal_info.an_name)<3)

goto LBL_ANML_NAME;

LBL_S_TYPE:

printf("\n\t\tENTER SPECIES TYPE : ");

scanf("%s",animal_info.s_type);

if(strlen(animal_info.s_type)>20 || strlen(animal_info.s_type)<3)

goto LBL_S_TYPE;

LBL_ANML_SEX:

while (isvalid != 1)

{

char dump;

printf("\n\t\tENTER SEX [M/F] : ");

isvalid = scanf("%[M,F,m,f]", animal_info.an_sex);

while((dump = getchar()) != '\n' && dump != EOF)

{

Page 37: thesis

37

}

}

// if(strlen(animal_info.an_sex)>1)

// goto LBL_ANML_SEX;

LBL_ANML_AGE:

printf(" \n\t\tENTER AGE: %d : " ,animal_info.anim_age);

scanf("%d",&animal_info.anim_age);

if(animal_info.anim_age<1||animal_info.anim_age>100)

goto LBL_ANML_AGE;

LBL_ANML_CHILD:

printf(" \n\t\tENTER NO. OF OFFSPRING: %d :",animal_info.num_of_offsprings);

scanf("%d",&animal_info.num_of_offsprings);

LBL_ANML_DETAILS:

printf("\n\t\tANIMAL DETAILS( if ANY )\n\t\t(Dont leave space,use'_'instead)': %s :

",animal_info.anim_history);

scanf("%s",animal_info.anim_history);

if(strlen(animal_info.anim_history)>50)

goto LBL_ANML_DETAILS;

fseek(fp,-record_size,SEEK_CUR); //Repositions the file pointer of a stream

//Write the input information to the file at current location

fwrite(&animal_info,record_size,1,fp);

printf("\n\t\tRECORD MODIFIED ");

break;

} //if

} //while

printf("\n\n\n\t\tDO U WANT TO MODIFY ANY OTHER RECORD[y/n]");

/*Flushes a stream On success returns 0 , On error returns EOF */

fflush(stdin);

cAns=getche();

} //while

} //ModifyAnimalInfo

//================================================================

=============

//Function Name DeleteAnimalInfo()

//

//Description This function deletes the animal info from the file

Page 38: thesis

38

//

//Parameter File Pointer

//

//================================================================

=============

void DeleteAnimalInfo(FILE *fp, int iUserMenuChoice)

{

struct ZooAnimal animal_info;

int record_size = sizeof(animal_info);

char cell_id[_CELL_ID_SIZE] = {0}; //init with null

int isExists = 0;

char cAns = 'y';

FILE *ft = NULL;

//Searching and Delete Records by id

while(cAns == 'y' || cAns == 'Y')

{

printf("\n\n\t\tENTER CELL ID TO delete RECORD : ");

scanf("%s",cell_id);

//Open Temp File in write mode

ft=fopen(TEMP_FILE,"wb");

//Repositions file pointer to stream's beginning

rewind(fp);

while(fread(&animal_info,record_size,1,fp)!=0)

{

if(strcmp(animal_info.cellid,cell_id)!=0)

{

fwrite(&animal_info,record_size,1,ft);

}

else

{

isExists = 1;

printf("\n\n\t\t RECORD DELETED SUCCESSFULLY");

} //else-if

} //while

if (isExists != 1)

{

isExists = 0;

printf("\n\n\t\t NO SUCH RECORD FOUND");

} //if

//Close the Files

fclose(fp);

Page 39: thesis

39

fclose(ft);

//ENDANGERED SPECIES CONSERVATION CONSERVATION

if(iUserMenuChoice == _OPT_ONE)

{

remove(ZOO_MGMT_FILE_1);

rename(TEMP_FILE,ZOO_MGMT_FILE_1);

fp=fopen(ZOO_MGMT_FILE_1,"rb+");

}

//NON ENDANGERED SPECIES SUPPORT SYSTEM

else if(iUserMenuChoice == _OPT_TWO)

{

remove(ZOO_MGMT_FILE_2);

rename(TEMP_FILE,ZOO_MGMT_FILE_2);

fp=fopen(ZOO_MGMT_FILE_2,"rb+");

} //if

printf("\n\n\t\tDO U WANT TO delete ANOTHER RECORD[y/n]");

fflush(stdin);

cAns=getche();

} //while

} //DeleteAnimalInfo

//================================================================

=============

//Function Name main()

//

//Description This function is main function where execution starts

//

//Parameter NONE

//

//================================================================

=============

void main()

{

int iUserMenuChoice = 0;

LBL_DISPLAY_MENU:

DisplayMainMenu();

cprintf("PLEASE ENTER YOUR CHOICE:");

scanf("%d",&iUserMenuChoice);

Page 40: thesis

40

//If user chose to exit

if(iUserMenuChoice > _OPT_THREE || iUserMenuChoice < _OPT_ONE)

{

printf("\n You have entered wrong choice ! Press any key to continue...");

getch();

goto LBL_DISPLAY_MENU;

}

else if(iUserMenuChoice == _OPT_THREE)

{

ExitTheSystem();

}

else

{

FILE *fp, *fp_opt1, *fp_opt2;

char cChoice;

//Open the File for ENDANGERED SPECIES

fp_opt1 = fopen(ZOO_MGMT_FILE_1,"rb+");

if(fp_opt1==NULL)

{

fp_opt1=fopen(ZOO_MGMT_FILE_1,"wb+");

if(fp_opt1==NULL)

{

puts("\n\t\tCannot Open file");

//exit();

} //if

} //if

//Open the File for NON-ENDANGERED SPECIES

fp_opt2 = fopen(ZOO_MGMT_FILE_2,"rb+");

if(fp_opt2==NULL)

{

fp_opt2=fopen(ZOO_MGMT_FILE_2,"wb+");

if(fp_opt2==NULL)

{

puts("\n\t\tCannot Open file");

//exit();

} //if

} //if

while(1)

{

clrscr();

textcolor(4);

if(iUserMenuChoice == _OPT_ONE)

{

Page 41: thesis

41

gotoxy(30,8);

textcolor(4);

cprintf("ENDANGERED SPECIES MENU");

fp = fp_opt1;

}

else if(iUserMenuChoice == _OPT_TWO)

{

gotoxy(30,8);

textcolor(4);

cprintf("NON ENDANGERED SPECIES MENU");

fp = fp_opt2;

} //else-if

DisplayWildMgmtSystemMenu();

cprintf("SELECT YOUR OPTION: ");

fflush(stdin);

cChoice=getche();

clrscr();

gotoxy(25,8);

textcolor(5);

switch(cChoice)

{

case '1':

AddAnimal2DB(fp);

break;

case '2':

DisplayAnimalInfo(fp, iUserMenuChoice);

break;

case '3':

ModifyAnimalInfo(fp);

break;

case '4':

DeleteAnimalInfo(fp, iUserMenuChoice);

break;

case '5':

fclose(fp);

goto LBL_DISPLAY_MENU;

} //switch - user choice

} //while - infinite loop

} //else-if

} //main

Page 42: thesis

42

Page 43: thesis

43

Page 44: thesis

44

Page 45: thesis

45

Page 46: thesis

46

Page 47: thesis

47

Page 48: thesis

48

Page 49: thesis

49

SYSTEM TESTING System testing is a process of executing a program to locate an error. Testing is the

verification and validation activity for the software product. It involves checking processes,

such as inspection and reviews, at each stage of the software process from user

requirements definition to program development. During system testing, the system is used

experimentally to ensure that the software does not fail, i.e. it will run according to its

specification and in the way users expect to it.

Testing is a four stage process where system components are tested, and the integrated

system is tested and finally the system is tested with the item data. The four types of testing

are as follows:

UNIT

TESTING

INTEGRATION

TESTING

SYSTEM

TESTING

ACCEPTANCE

TESTING

Page 50: thesis

50

Figure 10.1: - Testing Process

Page 51: thesis

51

The following are the stages in testing process:

Unit Testing: - Unit testing is a method of testing that verifies the individual units of source code are

working properly. A unit is the smallest testable part of an application. Using

component level design description as a guide, important control paths are tested to

uncover errors within the boundary of the module. Tests of data flow across a module

interface were carried out for each module of the software. I.e. unit testing ensures

that functions or procedures are operating correctly. Each component is tested

individually.

Black Box Testing: - Black box testing takes an external perspective of the test

object to derive test cases. These tests can be functional or non-functional, though

usually functional. The test designer selects valid and invalid inputs and

determines the correct output. There is no knowledge of the test object's internal

structure.

Figure 10.2: - Black box testing diagram

White Box Testing: - White box uses an internal perspective of the system to

design test cases based on internal structure. It requires programming skills to

identify all paths through the software. The tester chooses test case inputs to

exercise paths through the code and determines the appropriate outputs. In

electrical hardware testing, every node in a circuit may be probed and measured.

While white box testing is applicable at the unit, integration and system levels of

the software testing process, it is typically applied to the unit. While it normally

tests paths within a unit, it can also test paths between units during integration,

and between subsystems during a system level test. Though this method of test

design can uncover an overwhelming number of test cases, it might not detect

unimplemented parts of the specification or missing requirements, but one can be

sure that all paths through the test object are executed.

Integration Testing: - Integration testing is a process of combining multiple modules systematically for

conducting tests in order to find errors in the interface between modules. The goal

here is to see if the modules can be integrated properly. Hence, the emphasis is on

testing the interfaces between modules. The integration testing follows the following

strategies: -

Page 52: thesis

52

Incremental strategy.

Non-incremental strategy.

Mixed strategy.

System Testing: - In the system testing, the entire software system is tested.

The reference document for this purpose is the requirements document, and the

objective is to see if the software meets its requirements. A number of different

types of testing are used at this stage. They are follows:

o Functional Testing: - It is concerned with functionality rather than

the implementation of the program. In functional testing the structure

of the program is not considered.

o Performance Testing: - It deals with quality related issues like

security test, reliability test etc. System testing is done by the

developers and before the product is given to user for use.

Acceptance Testing: - After the system testing is completed successfully by

the developers. Acceptance testing is done at the user end. It is the user who now

designs the test cases. Acceptance testing is performed with realistic data of the

client to demonstrate that is software is working satisfactory.

Page 53: thesis

53

IMPLEMENTATION System implementation is the final stage of development. It consists of installing

hardware, programs, collecting data and organizing people to interact with and run

the system.

In the implementation phase, user actually starts using the system. This phase

therefore involves training the users for using the system and also providing them

documentation to refer to.

Implementation can be done in two ways. One way is by implementing the new

system along with the old system and makes them run in parallel. The other method is

to replace the entire system. In large organizations, the new system can be

implemented in certain areas as a pilot project and if satisfactory results are obtained,

it can be implemented to other areas also.

Page 54: thesis

54

CONCLUSION

This software is a database project with all the basic capabilities a database should

have. This application software is about managing the records of the animals and their

daily requirements. Records of the animals in park are saved in separate files and can

be used to locate any information about any particular animal. The objective of the

project is to perform all the functions or operations accurately.

Page 55: thesis

55

SCOPE OF THE PROJECT

The proposed system can manage all drawbacks of the existing manual system. The

system has a user friendly environment where the end user can perform all the

activity. Even if the user has little knowledge of computers he/she can easily operate.

The system proposed can easily be installed in any shop.

The system has the following objectives to be achieved

User Friendly Environment.

Less Space.

Fast Retrieval.

Easy to Operate.

Accuracy.

Cost Reduction.

.

Page 56: thesis

56

REFERENCES

WEB REFERENCES

http://google.com

BOOKS REFERENCES

ANSI C by E Balagurusamy Tata Mc Graw Hill India.

BOOK: ANSI in Turbo C

AUTHOR: Robert Lafore

PUBLISHER: Galgotia Publications pvt. Ltd.

Page 57: thesis

57

Page 58: thesis

58

Page 59: thesis

59

Page 60: thesis

60

Page 61: thesis

61


Recommended