You are on page 1of 98

S.No. i. ii. iii. iv. v. vi. 1. 2.

CONTENT DECLARATION CERTIFICATE ACKNOWLEDGEMENT LIST OF TABLES LIST OF FIGURES LIST OF ABBREVIATIONS Introduction Problem Selection 8.1 Problem Definition 8.2 Identification of need

PAGE No. ii iii iv vii viii ix 1-4 5-6

3.

Project Monitoring System 9.1 History 9.2 Features of C++

7-15

4.

System Study 10.1 Operational feasibility Study 10.2 Technical Feasibility Study 10.3 Schedule Feasibility Study 10.4 Economical feasibility Study 10.5 Software process model 10.6 Requirement Analysis 10.7 Software & Hardware Requirements

16-23

5.

System Analysis 11.1 Overall strategy 11.2 Problem with the current system 11.4 Dataflow analysis of the current system

24-30

6.

System Design 12.1 Design analysis 12.2 Design Methodology 12.3 Design overview 12.4 Data flow diagram 12.5 Data Dictionary 12.6 Entity relationships diagram System Testing & implementation Documentation Conclusion Scope of project References

31-42

7. 8. 9. 10. 11.

43-49 50-87 88-89 90-91 92-93

List of Tables

SNo 1. 2. 3.

Table No. 6.1 12.4 6.2

Description of table List of abbreviations Data dictionary Opening modes of files

Page No. ix 11 21

(Table 4.1)

List of Figures

S.No. 1.

Table No. 12.4.1

Description of table Context level diagram of Zoo Management System

Page No. 38

2. 3.

12.4 .2 12.6

Level 1 DFD for Process 1.0 Entity-Relationship Diagram


(Table 5.1)

39 40

List of Abbreviations
Sno. Abbreviations Word

1 2 3 4 5 6

Rec RA Ackn Prg H/w S/w

Records Requirement Analysis Acknowledgment Programs Hardware Software

(Table 6.1)

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.

OBJECTIVES OF THE PROJECT


The main objective of the Zoo 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 doesnt 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 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 maintain the registers of records. There are more chances of losing the records during handling them.

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.

PROJECT MONITORING SYSTEM


C++ is a general-purpose, high-level programming language with low-level facilities. It is a statically typed free-form multi-paradigm language supporting procedural programming, data abstraction, object-oriented programming, generic programming and Runtime Type Identification (RTTI). Since the 1990s, C++ has been one of the most popular commercial programming languages. Bjarne Stroustrup developed C++ (originally named "C with Classes") in 1983 at Bell Labs as an enhancement to the C programming language. Enhancements started with the addition of classes, followed by, among other features, virtual functions, operator overloading, multiple inheritance, templates, and exception handling. The C++ programming language standard was ratified in 1998 as ISO/IEC 14882:1998, the current version of which is the 2003 version, ISO/IEC 14882:2003.

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.

PERT CHART Problem Definition 1 2 2 3 System analyze 3 5 Flow chart 5 3 4 4 DFD Feasibility study

6 2

Data Dictionary

7 30

Coding

I Testing 8 2

Figure 6.2: - PERT chart

Actual Process
S.No 1. 2. 3. 3.1. 3.2. 3.3. 3.4. 4. 5. Phase Problem Definition Feasibility study System design Flow Chart DFD Data Dictionary Complete documentation Coding Testing analysis and 3 2 1 10 35 3 3 6 2 11 7 4 1 5 Time Estimate in days 4 5 Actual Time

Total Number of Hours= 60days* 5 hours = 300 hrs. Table 6.1: - PERT Process

Methodology Used: The methodology I will be using in my project is C++ with OOP's concept. C++ ("C plus plus") is a general-purpose programming language. It is regarded as a middle-level language, as it comprises a combination of both high-level and low-level language features. It was developed by Bjarne Stroustrup in 1979 at Bell Labs as an enhancement to the C programming language and originally named "C with Classes". It was renamed to C++ in 1983. It is a statically typed free-form multi-paradigm language supporting procedural programming, data abstraction, object-oriented programming, generic programming and Runtime Type Identification (RTTI). Since the 1990's, C++ has been one of the most popular commercial programming languages.

History of C++: The c++ programming language was developed at AT&T Bell Laboratories in the early 1980s by Bjarne Stroustrup. Stroustrup began work on C with Classes in 1979. The idea of creating a new language originated from Stroustrup's experience in programming for his Ph.D. thesis. Stroustrup found that Simula had features that were very helpful for large software development, but the language was too slow for practical use, while BCPL was fast but too low-level to be suitable for large software development. When Stroustrup started working in AT&T Bell Labs, he had the problem of analyzing the UNIX kernel with respect to distributed computing. Remembering his Ph.D. experience, Stroustrup set out to enhance the C language with Simula-like features. C was chosen because it was general-purpose, fast, portable and widely used. As the C++ language evolved, a standard library also evolved with it. The first addition to the C++ standard library was the stream I/O library which provided facilities to replace the traditional C functions such as printf and scanf. Later, among

the most significant additions to the standard library, was the Standard Template Library. C++ continues to be used and is still one of the preferred programming languages to develop professional applications. The language has gone from being mostly Western, to attracting programmers from all over the world.

Features introduced in C++: Compared to the C language, C++ introduced extra features, including declarations as statement, function-like casts, new/ delete, reference type, inline functions, default arguments, function overloading, namespaces, classes( including all class-related features such as inheritance, member function, virtual function, abstract classes, and constructors), operator overloading, templates, the :: operator, exception handling, and runtime type identification. OOP's concept with c++ language acts as a front-end as well as back-end. Back-end deals with the file handling concept of the c++. Basically the file handling concept uses data files to store the data. Thus the data files are the files that store data pertaining to a specific application, for later use. The data files can be stored in two ways: 1) Text files: - A text file stores information in ASCII characters. In text files, each line of text is terminated, with a special character known as EOL (End of Line) character. 2) Binary: - A binary file is just a file that contains information in the same format in which the information is held in memory. In binary file, there is no delimiter for a line. As a result, binary files are faster and easier for a program to read and write than text files. To open a file, there are various opening modes. The file mode describes how a file is to be used: to read from it, to write to it, to append it, and so on. The various files modes are as follows: -

OPENING MODES ios::in ios::out ios::app

DESCRIPTION Open file in input mode for reading. Open file in output mode for writing. Open file in output mode for writing the new content at the end of the file without removing the

ios::ate

previous contents of the files. Open file in output mode for writing the new content at the current position of the pointer

ios::trunc

without removing the previous contents of the files. Open file in output mode for writing the new content at the beginning of the file removing the

ios::nocreate ios::noreplace

previous contents of the files. The file is not created. The operation takes place in existing file. If the file is not found an error occurs. The existing file is not overwritten. The operations take place on existing file. If the file is not found an

ios::binary

error occur. Opens the file in binary mode reading not a character but reading/writing whatever the binary value is stored in the file.

Table 6.2: - Opening modes of file

Basic concepts of Object Oriented Programming: The basic concepts of Object Oriented Programming are as follows: 1. Objects: - Objects are the basic runtime entities in an object oriented system. 2. Classes: - Classes are the user defined data type and behave like a built in type of a programming language. 3. Data abstraction: - It means consider only those attributes or aspects of objects which are important for a particular class. 4. Data encapsulation: - The purpose of wrapping similar objects in a single unit is called encapsulation. It is done to secure objects from external world and misuse. 5. Inheritance: - Process of acquiring properties of one class to another class without physical declaration of variables is called inheritance. 6. Polymorphism: - When a single object or method behaves different in different location called polymorphism. It is done by using two types of overloading i. Function overloading ii. Operator overloading 7. Dynamic binding: - Binding refers to the linking of a procedural call to the code to the executed in response to the call. 8. Message passing: - An object oriented program consists of a set of objects that communicate with each other. The process of communication between the objects is known as message passing. In my project ZOO MANAGEMENT SYSTEM, I, tried to use or implement all these features of OOPS up to my level best.

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

Technical feasibility
The purpose of assessing technical feasibility is to gain an understanding of the organizations 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

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, CDs etc.

Conversion cost

It includes that of designing new forms and procedures, expenditure to prepare the project for using the new system.

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

Software and Hardware Requirement Specification

Hardware:

Intel Pentium III processor Minimum 128 MB RAM Recommended 256 MB RAM Minimum hard disk 40GB

Software:

Windows operating system C++ complier compatible with the Windows OS

It is the most important phase of the system development cycle.The analysis phase is the detailed understanding of all important facts of the business area under investigation. The relationship of the various system components among themselves and with environment are studied and understood. This requires data collection from a variety of sources. Analysis involves deep study of the task. System analysis is the process of gathering and interpreting facts diagnose the problems, defining the goals, design the constraints and using the facts improve the system. The aim of system analysis to identify the boundaries of the system and their sub-systems and interface between sub-systems and systems.

INFORMATION REQUIRED: What is being done in the project? The systems analysis process is an iterative one that cycles repeatedly through the following interrelated and somewhat indistinct phases: (1) problem statement, in which the system is defined in terms of its environment, goals, objectives, constraints, criteria, actors (decision makers, participants in the system, impacted constituency), and other objects and their attributes. (2) Alternative designs, in which solutions are identified (3) Mathematical formulation, in which a mathematical description of the system is developed, tested, and validated (4) Evaluation of alternatives, in which the mathematical model is used to evaluate and rank the possible alternative designs by means of the criteria (5) Selection and implementation of the most preferred solution. The process includes feedback loops in which the outcomes of each phase are reconsidered based on the analyses and outcomes of the other phases. For example, during the implementation phase, constraints may be uncovered that hinder the solution's implementation and thus cause the mathematical model to be reformulated. The analysis process continues until there is evidence that the mathematical structure is suitable; that is, it has enough validity to yield answers that are of value to the system designers or the decision maker. The evolution of a computer based system follows a pattern called system life cycle. System analysis is the process of gathering information and interpreting facts, diagnosing & using the information to recommend improvement to the system. The most accepted definition of system analysis is System analysis is a management technique which helps us in designing a new system or improving the exiting

system. In the system development life cycle first three parts like Requirement Analysis, Feasibility analysis and basic system specification fall under the system analysis part. System analysis is the application of the system approach to problem solving using computers. The ingredients are the systems elements, processes and technology. Analysis is the detail study of the various operations performed in present system and their relationship within and outside the system. During analysis, data is collected from the available files and various transactions handled by the present system. There are various characteristics of system :

Characteristics of a System:
1. Organization: It says the Structure or order of built. 2. Interaction: Procedure in which the components interact. 3. Interdependence. 4. Integration 5. Central Objective There are various types of elements of System Analysis There are 4 basic elements of System analysis, they are 1. Outputs. 2. Inputs: The essential elements of Inputs are Accuracy of data Timeliness Proper format Economy.

3. Files. 4. Process. OVERALL STRATEGY PROBLEMS WITH THE CURRENT SYSTEM DATA FLOW ANALYSIS OF THE CURRENT SYSTEM DATA DICTIONARY

The goal of the analysis stage is to build and understand the scenario involved and to create a description of just what is desired and what will eventually be built. To understand the problem we must have input to get output. This can take the form of interviews, specifications regarding to level of performance and random data.

11.1 OVERALL STRATEGY:


To understand the current processes for the feedback, I developed the following strategy: Sample all documents and records of information. Observe actual procedures followed. Determine the current strategies.

11.2 PROBLEM WITH THE CURRENT SYSTEM :


The current system is not organized. It is a system based on more of common sense. The main idea behind this system is as it has been going on fine. The speed of the system depends on human speed and mood. Since it is totally depending on human, efficiency is low. There is less security as all the information is basically kept as hard copy in a register. The computer back up is also in the file system.

11.3 DATA FLOW ANALYSIS FOR THE CURRENT SYSTEM:


After completion of the deep study of the current system, I am now ready to do the data flow analysis of the client.
This Data Flow Analysis consists of the Data Flow Diagrams (DFDs) which describe processes and data movement in the system and Data Dictionary (DD), which defines the systems elements. Both provide useful information for designing the candidate system. How is it being done? What are the problems that may arise? If a problem arises, how will it be solved? What could cause such a problem? For this I have collected the data by consulting various departments, persons working in different departments. Then I discussed various issues with my project incharge and other staff members

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 & entityrelationship 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.

12.4 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 ZOO MANAGEMENT SYSTEM is designed in the next stage following the DFDs and the DD.

Zm.dat :

Column name iCh1 iInc offspr anim_history an_name

Data type int int char char char

length 5 5 2 50 30

keeper_nm cell id an_sex anim_age offno Wt offrat inbreed food_s

char char char int int Float float float float

20 4 2 5 5 7 7 7 7

food_c cell_id recsize

Float char long int (Table 12.4)

7 4 10

Other transaction or master table may be generated accordingly if required while developing the system. Tools/Platform, Languages to be used Operating System Languages RDBMS Application : : : : Windows XP C++ Programming MS Access ulti-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.

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 (DFDs) 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.

Context level DFD

Enquiry Management Response Wildlife Management System

Checks Wildlife Database Status

LEVEL

Enquires

verifies

Management response

Forest Conservation system

Forest data file status

Desert Conservation system

Desert data file

Level 2
Management Animal physical detail

If not Animal category ANIMAL DATABASE

If not Feeding detail

If not Inherit detail

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

Cel l id

nam e

age

Wildlife

Conserves

Deserts

ha vee ee Birds Protects Forests

Conser ves Animals

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

Figure 10.1: - Testing Process

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: 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.

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.

DOCUMENTATION

#include<iostream.h> #include<stdio.h> #include<conio.h> #include<dos.h> #include<string.h> void main()

{ int iCh1,iInc; e: clrscr(); /* To Display Main menu */

gotoxy(26,40); textcolor(9); gotoxy(32,44); textcolor(19); gotoxy(23,42); cprintf("ZOO MANAGEMENT SYSTEM "); gotoxy(8,45); textcolor(9); /* To Display date and time */ cprintf("DATE : %s ",__DATE__); gotoxy(55,45); cprintf("TIME : %s ",__TIME__); for(iInc=0;iInc<=30;iInc++)

{ gotoxy(20,iInc); textcolor(7); cprintf("-"); }

for(iInc=0;iInc<80;iInc++)

{ gotoxy(iInc,30); textcolor(7); cprintf("|"); }

gotoxy(30,8); textcolor(9); /* Main menu */ cprintf("ZOO MANAGEMENT SYSTEM"); gotoxy(30,10); textcolor(19); cprintf("1.FOREST CONSERVATION"); gotoxy(30,12); cprintf("2.DESERT CONSERVATION"); gotoxy(30,14); cprintf("3.EXIT"); gotoxy(30,18); textcolor(9); cprintf("ENTER YOUR CHOICE:"); cin>>iCh1;

if (iCh1==3)

{ /* To exit from the system */ gotoxy(30,28); textcolor(4); cprintf("SYSTEM SHUTTING DOWN"); sleep(3); gotoxy(26,40); gotoxy(8,42); printf("ZOO MANAGEMENT SYSTEM"); gotoxy(8,45); printf("DATE : %s ",__DATE__);

gotoxy(55,45); printf("TIME : %s ",__TIME__); //exit(0); }

else{ /* Declarations of Variables */ FILE *fp,*ft; char cAns,cChoice; struct zoo

char offspr[2],anim_history[50],an_name[30],keeper_nm[20],cellid[4],an_sex [2]; int anim_age,offno; float wt,offrat,inbreed,food_s,food_c; };

struct zoo e; char cell_id[4]; int iF=0,iC=0,iF1=0,ich1; long int lRecsize; fp=fopen("zm.dat","rb+"); if(fp==NULL)

fp=fopen("\zm.dat","wb+"); if(fp==NULL)

{ puts("\n\t\tCannot Open file"); //exit(); }

lRecsize=sizeof(e); while(1)

{ clrscr(); textcolor(4);

if(iCh1==1) { gotoxy(30,8); textcolor(4); cprintf("ANIMAL MENU"); }

else if(iCh1==2) { gotoxy(30,8); textcolor(4); cprintf("BIRD MENU"); }

gotoxy(26,40); textcolor(4); gotoxy(32,44); textcolor(19); gotoxy(23,42); textcolor(19); cprintf("ZOO MANAGEMENT SYSTEM"); gotoxy(8,45); textcolor(4); cprintf("DATE : %s ",__DATE__); gotoxy(55,45); cprintf("TIME : %s ",__TIME__); for(iInc=0;iInc<=30;iInc++)

{ gotoxy(20,iInc); textcolor(7); cprintf("-"); }

for(iInc=0;iInc<=80;iInc++)

{ gotoxy(iInc,30); textcolor(7); cprintf("|"); }

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"); gotoxy(30,20); textcolor(4); cprintf("SELECT YOUR OPTION: "); fflush(stdin);

cChoice=getche(); clrscr(); gotoxy(25,8); textcolor(5); switch(cChoice)

{ case '1': //To add a record w: printf("\n\n\n\t\tENTER CELL ID( 3 DIGIT NO.): "); cin>>ich1; rewind(fp); //Checking for unique id

while(fread(&e,lRecsize,1,fp)==1)

{ if(strcmp(e.cellid,cell_id)==0)

{ iF=1; cout<<"\n\t\tTHE ID ALREADY EXISTS"; goto w; }}

if(iF==0||fread(&e,lRecsize,1,fp)==0)

{ fseek (fp,0,SEEK_END); strcpy(e.cellid,cell_id); a3: cout<<"\n\t\tENTER ANIMAL NAME: "; cin>>e.an_name; if(strlen(e.an_name)>30||strlen(e.an_name)<3) goto a3; cout<<"\n\t\tENTER ZOO KEEPER NAME: "; cin>>e.keeper_nm; p: cout<<"\n\t\tENTER SEX [M/F]: "; cin>>e.an_sex; if(strlen(e.an_sex)>1)

goto p; f: cout<<"\n\t\tENTER AGE : "; cin>>e.anim_age; if(e.anim_age<0||e.anim_age>100) goto f; a5: cout<<"\n\t\tOFFSPRING [P/A]:"; cin>>e.offspr; if(strlen(e.offspr)>1) goto a5; cout<<"\n\t\tENTER NO. OF OFFSPRING: "; cin>>e.offno; cout<<"\n\t\tFOOD SUPPLIED( IN KG): "; cin>>e.food_s;

cout<<"\n\t\tFOOD CONSUMED( IN KG): "; cin>>e.food_c; a2: cout<<"\n\t\tANIMAL DETAILS(IF ANY)\n\t\t(Don't leave space,use '_'): "; cin>>e.anim_history; if(strlen(e.anim_history)>50) goto a2; fwrite(&e,lRecsize,1,fp); /*Flushes a stream On success returns 0 , On error returns EOF */ fflush(stdin); }

break; case '2':

//Searching and displaying all the infor // mation by id

textcolor(7); cout<<"\n\n\n\t\tENTER CELL ID: "; cin>>cell_id; rewind(fp); while(fread(&e,lRecsize,1,fp)!=0)

{ if(strcmp(e.cellid,cell_id)==0)

{ iC=1; clrscr();

//Display according to Main menu gotoxy(0,20); //FOREST CONSERVATION

if(iCh1==1){ cout<<"\n\n\n\t\tDETAILS OF THE ANIMAL:%s",strupr(e.an_name);

cout<<"\n___________________________________________________ __________________\n\n"; cout<<"\n\n NAME : %s\t CELL ID : %s\t ZOO KEEPER NAME : %s\n\n SEX: %s\t AGE : %d \n\n OFFSPRING: %s\n\n OFFSPRING NO. : %d\n\n OFFSPRING RATIO : %f\n\n INBREED RATIO : %f\n\n FOOD SUPPLIED : %f\n\n FOOD CONSUMED : %f\n\n ANIMAL DETAILS: %s",strupr(e.an_name),strupr(e.cellid),strupr(e.keeper_nm),strupr(e.an_s

ex),e.anim_age,strupr(e.offspr),e.offno,(e.offno/13.33*6.2), (e.offno*12.66/17.3574),e.food_s,e.food_c,strupr(e.anim_history);

cout<<"\n___________________________________________________ __________________\n\n"; getch(); } //DESERT CONSERVATION

else if(iCh1==2){ cout<<"\n\n\n\t\tDETAILS OF BIRD: %s",strupr(e.an_name);

cout<<"\n___________________________________________________ __________________\n\n"; cout<<"\n\n NAME : %s\t CELL ID : %s\t ZOO KEEPER NAME : %s\n\n AGE: %d\t SEX : %s \t

OFFSPRING: %s\n\n OFFSPRING NO. : %d\n\n OFFSPRING RATIO : %f\n\n INBREED RATIO : %f\n\n FOOD SUPPLIED : %f\n\n FOOD CONSUMED : %f\n\n ANIMAL DETAILS: %s",strupr(e.an_name),strupr(e.cellid),strupr(e.keeper_nm),e.anim_age,st rupr(e.an_sex),strupr(e.offspr),e.offno,(e.offno/13.33*6.2), (e.offno*12.66/17.3574),e.food_s,e.food_c,strupr(e.anim_history);

cout<<"\n___________________________________________________ __________________\n\n"; getch(); } }

if(iC==0)

{ cout<<"\n\t\tRECORD DOESN'T EXISTS.."; getch(); }iC=0;

break; case '3': //Searching and modifying Records by id cAns='y'; while(cAns=='y')

{ cout<<"\n\n\n\t\tENTER CELL ID: "; cin>>cell_id;

rewind(fp); while(fread(&e,lRecsize,1,fp)==1)

{ if(strcmp(e.cellid,cell_id)==0)

{ b: cout<<"\n\n\t\tENTER ANIMAL NAME: %s : ",strupr(e.an_name); cin>>e.an_name; if(strlen(e.an_name)>20|| strlen(e.an_name)<3) goto b;

b1: cout<<" \n\t\tENTER SEX : %s : ",strupr(e.an_sex); cin>>e.an_sex; if(strlen(e.an_sex)>1) goto b1; r: cout<<" \n\t\tENTER AGE: : "; cin>>e.anim_age; if(e.anim_age<1||e.anim_age>100) goto r; ad: cout<<" \n\t\tOFFSPRING : ",strupr(e.offspr); cin>>e.offspr; if(strlen(e.offspr)<1)

goto ad; cout<<" \n\t\tENTER NO. OF OFFSPRING: %d :",e.offno; cin>>e.offno; cout<<" \n\t\tENTER FOOD SUPPLIED(IN KG): %f :",e.food_s; cin>>e.food_s; cout<<"\n\t\tFOOD CONSUMED( IN KG): "; cin>>e.food_c; b5: cout<<"\n\t\tANIMAL DETAILS( if ANY )\n\t\t(Dont leave space,use'_'instead)': %s : ",e.anim_history; cin>>e.anim_history; if(strlen(e.anim_history)>50) goto b5;

fseek(fp,lRecsize,SEEK_CUR); //Repositions the file pointer of a stream fwrite(&e,lRecsize,1,fp); cout<<"\n\t\tRECORD MODIFIED "; break; }

cout<<"\n\n\n\t\tDO U WANT TO MODIFY ANY RECORD[y/n]"; /*Flushes a stream On success returns 0 , On error returns EOF */ fflush(stdin); cAns=getche();

break; case '4': //Searching and deleting records by id cAns='y'; while(cAns=='y')

{ cout<<"\n\n\t\tENTER CELL ID TO delete RECORD : "; cin>>cell_id; ft=fopen("temp.dat","wb"); rewind(fp); //Repositions file pointer to stream's beginning

while(fread(&e,lRecsize,1,fp)!=0)

if(strcmp(e.cellid,cell_id)!=0) { fwrite(&e,lRecsize,1,ft); }

else { iF1=1; cout<<"\n\n\t\t RECORD DELETED SUCCESSFULLY";

if(iF1!=1){iF1=0; cout<<"\n\n\t\t NO SUCH RECORD FOUND";} fclose(fp); fclose(ft); remove("zm.dat"); rename("temp.dat","zm.dat"); fp=fopen("zm.dat","rb+"); cout<<"\n\n\t\tDO U WANT TO delete ANOTHER RECORD[y/n]"; fflush(stdin); cAns=getche();

break; case '5': fclose(fp); goto e; }

MAIN SCREEN-

FOREST CONSERVATION-

DESERT CONSERVATION-

RECORD ADDED-

RECORD DISPLAYED-

RECORD MODIFIED-

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.

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.

REFERENCES

WEB REFERENCES

http://google.com

BOOKS REFERENCES Object Oriented Programming with C++ by E Balagurusamy Tata Mc Graw Hill India.

BOOK: Object Oriented Programming in Turbo C++ AUTHOR: Robert Lafore PUBLISHER: Galgotia Publications pvt. Ltd.

You might also like