Beruflich Dokumente
Kultur Dokumente
2008-2009
Student details:
Name: Anshul Jain
Student Id: 200701119
E-mail: 200701119@daiict.ac.in
Address of Institute:
State Remote Sensing & Application Center (SRSAC)
Subash Nagar, Pal Road
Jodhpur, Rajasthan
2
ACKNOWLEDGEMENT
I express my deep sense of gratitude to Dr. N.K. Karla, Project Director for
encouraging me to take the training at SRSAC (State Remote Sensing &
Application Center).
I am very thankful to Mr. Rajeev Jain and Dr. Sushil Dadich whose scholarly
guidance, encouragement and affectionate pressure helped me in completing
this training and project work. Their inspiration encouragement, suggestion
and very constructive criticism have contribution immensely to the evolution
of my ideas on the subject.
Lastly, I would also like to express my heartfelt thanks to the staff members of
State Remote Sensing & Application Centre for their Valuable guidance and
helping me during my training period.
Anshul Jain
BTech 2nd Year
Dhirubhai Ambani Institute of Information & Communication Technology
Gandhinagar, Gujrat.
3
SRSAC
OBJECTIVES :
Generation of number of database related to natural resources for developmental
planning activities in the state using remote sensing techniques (Aerial Photo
Interpretation and Satellite data interpretation both visually as well as digital mode).
To generate data bank consisting of temporal and spatial data products and to
generate information system on natural resources.
To interact with various user agencies for the formulation and implementation of
Remote Sensing Projects for development planning.
To undertake short term and long term experimental and operational remote sensing
studies to identify, and manage various natural resources such as soil, water, forest,
agriculture, minerals, settlement, town planning, drainage, roads and geology
for monitoring changes due to natural calamities such as drought, flood and also to
evaluate land use changes.
Human Resource Development in the field of remote sensing by organizing short
term appraisal courses / seminars or workshop / exhibitions on remote sensing
application for the user departments, agencies, NGO’s and students.
To interact with National Remote sensing Institute like National Remote Sensing
agency (NRSA), Hyderabad, Space Application Centre (SAC), Ahmedabad,
Regional Remote Sensing Service Centre (RRSSC), Jodhpur to carry out joint
projects.
REMOTE SENSING
4
SPACE BORNE: In this type of remote sensing object is sensed from space by a satellite
through various types of sensors .It is concerned with the measurement of sun’s energy
(electromagnetic) which are reflected, emitted by objects receiving and returning the
energy from the sun. The sun’s energy, commonly referred to as electromagnetic
spectrum, is array of electro-magnetic radiation that moves with constant velocity, which
is characterized, by wavelength or frequency.
AIR BORNE: In this art of science, photographs are taken by a camera board on an
airplane. The successive photographs of terrain are taken in such a way that 60% overlap
in forward direction and 30% overlap in lateral direction of flight line is taken so as to
have stereoscopic view and full coverage. The height of plane depends on scale of the
photography required. The scale of photographs is ratio of focal length of lens of camera
to flying height.
An aerial photograph is one taken from an elevated platform such as a balloon, airplane,
rocket or a satellite .The earliest air photos were taken from balloon in France in 1858
and in the United States in 1860.
GROUND BOURNE: The data products from satellite and aerial photographs can be
analyzed visually and digitally. In this type of remote sensing observation of each and
every object is done via going to that place directly and analyzing its features.
AERIAL PHOTOGRAPHS
5
By the time of the First World War (1914-1918), systematic aerial photographic cover
was possible. Specific flights lines could be planned and photographs taken at designated
intervals. In terms of geometry there are two major types of aerial photos: Oblique and
Vertical. Oblique can be further divided into those in which the horizon is visible (high
oblique) and in which it is not (low oblique).The great advantage of oblique photograph
of both kinds is that features are seen from a more or less familiar point of view. The
disadvantage is that, became of perspective, measurement is more difficult on oblique
than on vertical photos.
Facts On Aerial Photogrammetry: Fellin Tournachoul(aka Nadir) was the 1st person to
use this technology. In 1858, he took picture of earth via hot air balloon of Petil (a town
near Paris, France).
AERIAL PHOTOGRAPHS
OBLIQUE VERTICAL
HIGH LOW
6
With advancement in remote sensing technique, India has developed varying mapping
capability through indigenous resource satellites
Spectral Bands 0.45 - 0.52 Multi Spectra B2 0.52 -0.59 B3 0.62 -0.68 0.50-0.7
Mean altitude 705 Km. 822 Km. 817 Km. 817 Km. 817 Km.
SWATH Width 141 Km. (for Ba 2,3&4) 810Km. 70 Km.
185 Km. 2 *60 Km.
(Nadir) 148 KM. (for Ba 5 only)
Equatorial
9 H30 10 H30 10 H30 10 H30 10 H30
Crossing Time
Details of Some Resource Satellites
8
DEFINITION:
Other Definitions:
A database system in which most of the data is spatially indexed and upon which
a set of procedures operated in order to answer queries about spatial entities in
database.
APPLICATIONS OF GIS:
Many of the early applications in Europe built land registration systems and
environmental database. In Britain’s it is used creating developing utility system and
creating a comprehensive topographic database for the country.
Canada developed an important forestry application to plan the volume of timber to
cut identify access; Applications to China and Japan emphasized monitoring and
modeling possible environmental changes.
In the United States, the US bureau of census and the US Geographical Survey
used GIS technology for their Topologically Integrated Geographic Encoding and
Referencing (TIGER) project. They produced a computerized description of the US
Transportation Network at the cost of about $170million –to facilitate taking and
reporting the 1990 census.
Today the numbers of variety of applications for GIS are impressive.
THE RESULTS
Components of a GIS
A working GIS integrates five key components: hardware, software, data, people, and
methods.
Hardware
Hardware is the computer on which a GIS operates. Today, GIS software runs on a wide
range of hardware types, from centralized computer servers to desktop computers used in
stand-alone or networked configurations.
12
Software
GIS software provides the functions and tools needed to store, analyze, and display
geographic information. Key software components are:
Tools for the input and manipulation of geographic information.
A database management system (DBMS).
Tools that support geographic query, analysis, and visualization.
A graphical user interface (GUI) for easy access to tools.
Data
Possibly the most important component of a GIS is the data. Geographic data and related
tabular data can be collected in-house or purchased from a commercial data provider. A
GIS will integrate spatial data with other data resources and can even use a DBMS, used
by most organizations to organize and maintain their data, to manage spatial data.
People
GIS technology is of limited value without the people who manage the system and
develop plans for applying it to real-world problems. GIS users range from technical
specialists who design and maintain the system to those who use it to help them perform
their everyday work.
Methods
A successful GIS operates according to a well-designed plan and business rules, which
are the models and operating practices unique to each organization.
13
Geographic References
Raster GIS Packages organize spatial features in a spatial domain of grids/raster, which
are defined by dividing the space into equal units and obtaining a matrix of
grids/rasters. Rasters are limited by the area they can represent and also the limits
of storage space. Also the fineness of data is limited by the cell size - thus the area
of coverage is traded off with the resolution of the coverage. The storage problems
are handled by restoring to coding such as run length coding, chain coding, block
coding etc.
Vector GIS Packages represent spatial features in a very accurate manner and adopt
sophisticated topological relationships to represent different features. The vector data
represents each geographical feature by a set of coordinates. Vector as xy coordinates
define points, lines and polygons. The basic premise of the vector-based structuring is to
define a 2-dimensional space where features are represented by coordinates on the two
axes.
16
There are two characteristically different ways of spatial data representation for GIS
applications; questions of preferring one method over the other arise. Some of the
issues that need consideration are as follows:
Vector data is precise and has no approximation errors for measured quantities like area,
length, perimeter, etc. (subject, of course, to the representational accuracy of the hardware).
Due to the discretization raster data suffers from such approximation errors.
Generally, raster data has higher storage requirements though compression techniques can
be adopted. Vector storage is relatively less.
GIS manipulation operations on raster data are computationally faster and less complex
than their equivalents on vector data. Imposing a structure on 2D vector data that is
sufficiently formal and supports efficient searching is fairly complex.
Raster data is not easily amendable to association of attribute data with spatial features
such as points, lines or polygons. This is due to the fact that the basic entity in raster
approach is the grid cell and entities such as points.
Raster is limited be the cell-size and sampling or disaggregation to a lower size is not
possible. Vector structure does not impose this limitations and thus analysis; plotting etc. is
more accurate in vector structure.
17
INPUT GIS offers to input data in both geographic and tabular way.
You can enter data into the computer in any of the following
ways:
MANIPULATION
ANDANALYSIS You can manipulate and analyze data to obtain the following:
MANAGEMENT
OVERLAY
ANALYSIS The integration of different data layers involves a process called
overlay.
Capturing data
The geographic database is the most and long –lived component of the GIS, thus making
data entry a very important consideration.
Because ARC/INFO integrates a variety of data types from a variety of sources, it
provides multiple data entry options.
ARC/INFO offers efficient data entry methods for automating paper maps and other
nondigital data sources. To take advantage of the vast collection of geographically
referenced data that already exist in digital format, ARC/INFO provides the most
comprehensive data conversion capability of any GIS on the market .ARC/INFO
software’s integrative capabilities also allow data sharing with other applications without
the need for data conversion.
Scanning
21
Storing data
Topology
What is Topology?
The user interprets additional information from maps about the spatial relationships
between features. For example you can trace a route along a city street map to find your
way from an airport to a hotel. You interpret these relationships by identifying connecting
lines along a path, by defining the areas enclosed within these lines, and by identifying
contiguous areas. In digital maps, such spatial relationships are depicted using topology.
Arc-Node Topology:
Topology: - Arcs connect to each other at nodes (connectivity)
Polygon-Arc Topology:
Topology: - Arcs that connect to surround an area define a polygon (area
definition)
Left-Right Topology:
Topology: - Arcs have direction left and right sides (contiguity)
1. Shape
2. Size
3. Pattern
4. Shadow
5. Location
6. Texture
7. Association
Data inputs:
Displaying data Two types of data can be displayed with a GIS namely
Spatial data
Non-spatial data
Spatial Data: Consisting of maps and which have been prepared either by field
surveys or by the interpretation of Remotely Sensed (RS) data. Some examples of maps
are the soil survey map, geological map, land use map, village map etc.
Non-spatial Data: Attributes as complementary to the spatial data and describe what
is at a point, along a line or in a polygon. The attributes of a soil category could be the
depth of soil, texture, erosion, drainage etc. and for a geological category could be the
rock type, its age, major composition etc.
Examples of Point Type: tube well, electric pole, safety valves, mobile towers.
Examples of Line Type: roads, railway line, canals, drainage system.
Examples of Polygon Type: river, pond, hills.
24
Q: What is image?
Ans: Image is collection of pixel. While pixel is a discrete picture element.
Each pixel has a DN (Digital No.)
Remote sensing images are recorded in digital form and then processed by
computer to produce images for interpretation purpose. These images
contain large amount of data like a land set scene contain 13 lakh
numbers.
Classification of RS Data:
Unsupervised (FCC Mode) – In this the same information is taken
into consideration as we got from satellite.
The daily demands on water and sewer districts are tough. Managing the flow of water
and wastewater to service homes and businesses is a difficult task. In doing so, a utility
needs to manage many different kinds of geographic information. They must keep track of
the location and condition of water mains, valves, hydrants, meters, storage facilities,
sewer mains, and manholes. They must also keep up with NPDES compliance, TV
inspection data, and condition ratings.
Water agencies use GIS from ESRI to map the full extent of their water distribution
systems and link them to a database defining each element, including reservoirs, pipe
segments, services, and system appurtenances. GIS provides you with an intelligent
database so that job planning, equipment inventory, and flow analysis become an
automated procedure integrated into one system. You can link your current network
modeling system to the GIS, tie it to the attribute data, and map the results.
ESRI's GIS software lets you represent a project in three-dimensional form to visualize
the impact of facilities on landscape during the design process. These data can then be
combined with other computer-aided engineering functions to assist the engineering
designer in the planning and scenario testing of various designs.
Planning and engineering tasks that can be accomplished more easily using ESRI's GIS
software include:
Watershed modeling
Water distribution system master planning
Population and demand projections
Groundwater management/modeling
Water quality monitoring
Hazardous materials tracking/underground tank management
Well log and data management
Site analysis
Geobibliography (past studies)
Development review and approval
Right-of-way engineering
Water flow analysis
Automated mapping
Capital improvement project tracking
Underground service alert
27
Many utilities have discovered the value of GIS for improving day-to-day operations.
GIS can be used to closely model utility networks and integrate other, related types of
data, such as raster images and CAD drawings. GIS spatial selection and display tools
allow user to visualize scheduled work, ongoing activities, recurring maintenance
problems and historical information.
The topological characteristics of a GIS database can support network tracing and can be
used to analyze specific properties or services that may be impacted by such events as
stoppages, main breaks, drainage defects, and so forth. Dynamic segmentation can also
be used to derive a generalized network that combines hydraulically similar sections into
larger strips to make pressure and flow analysis algorithms run more efficiently.
GIS can perform many other operations and maintenance tasks, including work order and
warehouse inventory management and SCADA.
Water and wastewater organizations are often responsible for constructing and/or
overseeing the development of new facilities and replacement of old facilities. GIS aids
in tracking information related to projects, permits, construction work order management,
inspections, as-built, and so forth.
Dynamic segmentation and image integration features in GIS allow utilities to store and
display images in conjunction with a footage reading and a description of the pipe defect
(roots, grease and other problems). Maps, drawings, and pictures can also be associated
with valves, manholes, drop inlets, and other features to provide valuable information to
the user.
28
Finance and Administration provides the central administrative oversight to support the
planning and operational activities of the organization. Budget forecasting, facility
inventory analysis, customer billing, and other key administrative functions can be
enhanced through the implementation of an integrated, enterprise wide GIS solution.
Rate justification
Capital improvement project tracking
Customer information service
Complaint tracking
Real property
Redistricting
29
HYDROLOGY
HYDROLOGY
TOPOGRAPHY
TOPOGRAPHY
LAND
LAND USE
USE
UTILITIES
UTILITIES
SOILS
SOILS
STREETS
STREETS
DISTRICTS
DISTRICTS
PARCELS
PARCELS
30
31
WHAT IS ARC/INFO?
TOOLBOX
ENTRY
EDITING
MANIPULATION
TOOLS
MANAGEMENT
ANALYSIS
DISPLAY
OUTPUT
32
WHAT IS ARC/INFO?
ARC/INFO software enables to integrate vector (x,y locations)map data ,raster images
such as photographs ,scanned documents or satellite images, computer aided drafting
(CAD) drawings , sound and video data ,as well as wealth of tabular DBMS data into a
single, integrated environment .ARC/INFO software is available for several UNIX
workstations and the Intel NT and DEC Aloha platform.
WHAT IS ARCTOOLS?
Arc Tools were developed using an object oriented programming methodology that
allows ArcTools to be used as a base to build custom applications. Individual tools can
readily be plugged into other applications, and adding custom tools is simple and
efficient. The object oriented methods employed to create ArcTools represent a major
break through in GIS application development.
Arc Tools are functionally grouped into four tool sets: Map Tools, Edit Tools, Grid Tools,
and Command Tools. This allows related tasks to be processed logically and quickly.
Additionally there is a Land Records, an Arc Tools application that manages land records
within the Arc Tools framework.
In each tool set a menu bar is displayed with pull down menus providing access to the
component tools. The tools can be used together or one at a time. Many common
operations have been included in more than one of the tool sets. For instance, the
ArcTools menu pull down is nearly identical in each of the tool sets. These menus
provide general tools for data base management, modeling, changing workspaces,
moving between tool sets, and accessing ARC/INFO programs, command lines and
system files. The basic functionality of each tool set is based on the ARC/INFO program
in which it operates.
34
ARCTOOLS
Map tools
Edit Tools
Grid Tools
Command Tools
Land Records
Ok
Ok Quit
Quit Help
Help
Map tools
Map
Map Tools
Tools
Arc
Arc Tools
Tools View
View Map
Map Tools
Tools Help
Help
tTools
tTools
Map Tools operate from within the ARCPLOT program, providing environment for data
display and query as well as map creation and output file generation. The Map pulldown
contains tools for managing the display and manipulation of map object properties
associated with a particular map layout. Map layout can be created, edited and saved as a
layout. The file can then be printed or plotted from within the Map Tools application.
35
Grid Tools
Edit Tools
Edit
Edit Tools
Tools
ArcTool
ArcTool File
File Edit
Edit Tools
Tools Display
Display Help
Help
ss
Edit Tools operate from within the ARCEDIT program, allowing the management of data
automation and related processing tasks. The file pulldown cotains the tools to generated
geographic fearture as well as tabular data . The edit pulldown provides access to a
complete set of production tools to modify and manipulate coverage topology and
associated feature attribute tables. The display pulldown tools manage the current graphic
enviorment.
Grid Tools
Grid
Grid Tools
Tools
ArcTools
ArcTools Analysis
Analysis View
View Map
Map Edit
Edit Tools
Tools Help
Help
Grid Tools provide a sophisticated enviroment within the GRID program for prforming
spatial analysisand data display. A series of sequential steps with associated properties
can be defined, edited and saved as a model.
37
Command Tools
Command Tools
ArcTools Tools Help
Command Tools operate within the ARC program. These Tools are also accessible from
within the Map Tools, Edit Tools, and Grid Tools sessions : From the main menu bar each
of these tool set, select Command tools….. on the Tools pulldown.
Project Overview
A GIS project can be organized into a series of logical steps. Although many GIS project
you undertake will follow a similar sequences of operations.
What is the problem to solve? How is it solved now? Are there any alternative
methods for it?
What are the final products of the project –reports, maps, presentation quality
maps?
This is the most critical and often the most time consuming part of the project. The
completeness and accuracy of the database determines the quality of the analysis and
the final projects. It includes
38
Design the database –determine the study area boundary coordinates system to use,
the attributes each feature type needs.
Manage the database- put the spatial data into real-world coordinates, join adjacent
coverage’s, and maintain the database.
A GIS efficiently performs analytical tasks that are extremely time consuming, or
even impossible to do manually. With GIS, we can test alternative scenarios simply
by making minor revisions in the analytic method. It is also used in conjunction with
our knowledge of the project objectives and the database we develop.
A GIS offers many options for creating customize maps and reports. The final
products should relate directly to the objectives of the project and the intended
audience.
39
In Rajasthan Remote Sensing activities started with the establishment of Aerial Photo
Interpretation Laboratory (APIL) in 1979 as a part of centrally sponsored Desert
Development Program, to assist soil and water conservation planning in the State under
State Agriculture Department. Later on in 1985 looking to the multi-disciplinary utility of
Remote Sensing technology, the laboratory was transferred to State Department of
Science and Technology and renamed as STATE REMOTE SENSING
APPLICATION CENTRE (SRSAC).
OBJECTIVES
To generate data bank consisting of temporal and spatial data base products.
To generate information system for Natural Resources.
To interact with various users agencies for the formulation and implementation of
development planning, using Remote Sensing technique.
To undertake short term and long term experimental and operational Remote
Sensing studies for various Natural Resources.
FACILITIES
The centre is premier Remote Sensing Application Centre in the Country and one
of the biggest State Centres in respect of Data Base generation, infrastructure
facilities &skilled manpower.
All types of optical equipments for visual interpretation and map generation.
System Hardware HP, Silicon Graphics workstation, Pentiums.
Wide range of input /output devices-laser and inkjet Printers (A4 to A0).
A0 size color scanner and Digitizers.
Technology offered to the users for –inventory, management and monitoring of Natural
Resources in the areas-
AGRICULTURE
SOIL CONSERVATION PLANNING
WATER RESOURCES
IRRIGATION
URBAN PLANNING
INDUSTRIES
ENVIRONMENT
DISASTER MANAGEMENT
GIS DEVELOPMENT
FISHERS
VIDEO FILMS:
GLOBAL POSITIONING
SYSTEM(GPS)
Points:
MY
PROJECT
On
‘LIBRARY MANAGEMENT’
Program is made in C++ using Dev CPP as a software tool.
In this record of employee and books are maintained with each
employee or book added results in addition of new entry.
Status of each book is maintained i.e. whether it is issued or available
in the library. On removal of book its record is deleted.
46
#include <iostream>
#include <ctype.h>
#include <string.h>
#include <conio.h>
#include <stdlib.h>
using namespace std;
class Employee
{
public:
int Eid;
char name[30];
char qual[30];
char desig[30];
int iss;
int age;
void AddEmployee();
void DisplayEmployee();
void DeleteEmployee();
void ModifyEmployee();
void SearchEmployee();
void IssueBook(int);
void ReturnBook(int);
}E[10];
class Book
{
public:
char Title[30];
char Pub[30];
47
int Qty;
char Author[30];
float Cost;
int Bid;
void AddBook();
void DisplayBook();
void ModifyBook();
void DeleteBook();
void SearchBook();
}B[30];
break;
case '3':
cout << "\n\t Qualification of Employee : " ;
gets(qual);
break;
case '4':
cout << "\n\t Age of Employee :";
cin >> age;
break;
default:
cout << "\n ! No option Selected !" << endl;
}
cout << "\n\nWant further changes [Y/N] : ";
cin >> change;
if (change == 'Y' || change == 'y')
continue;
else
return ;
}
cout << "\n\t--------------------------------------\n\n"<< endl;
}
puts(desig);
cout << "\n\t Qualification of Employee : " ;
puts(qual);
cout << "\n\t Age of Employee :";
cout << age <<endl;
cout << "\n\t Books Issued :";
cout << iss << endl;
}
for(i=0;i<y;i++)
{
if(bukid==bidarr[i])
{
j=eidarr[i];
break;
}
}
cout << "\n\t Book Issued by ID : " << E[j].Eid <<endl;
int i=Gbid;
while(Gbid<(Qty+i-1))
{
cout << ", "<< Gbid+1;
B[Gbid+1]=B[Gbid];
B[Gbid+1].Bid=B[Gbid].Bid+1;
Gbid++;
}
cout << "\n\t--------------------------------------\n\n"<< endl;
else
cout << " Available " << endl;
cout << "\n\t--------------------------------------\n\n"<< endl;
53
int mainmenu()
{
int menu;
system("cls");
cout << "\n\n\t\t\t MAIN MENU\t\t\t\t (0) To Exit" << endl;
cout << "\t\t\t ---------\n" << endl;
cout << "\n\t\t\t (1) EMPLOYEE MENU " << endl;
cout << "\n\t\t\t (2) BOOK MENU " << endl;
cout << " \n\n Enter your choice : " ;
while(1)
{
cin >> menu;
if(menu==1 || menu==2)
break;
else
{
cout << " \n\t!Invalid Selection! " << endl;
cout << " \n\tRe-enter your choice of menu : ";
}
if(menu==0)
exit(0);
}
return menu;
}
int main()
{
int w,cont,uid,menu;
char ch,task;
Gbid = 0, Geid=0;
system("cls");
while(1)
{
menu = mainmenu();
cont=0;
if(menu==1)
{
56
while(1)
{
system("cls");
cout << "\n\n\t\t\t EMPLOYEE MENU\t\t\t (0) To Exit" << endl;
cout << "\t\t\t -------------\n" << endl;
cout << "\t\t\t (1) ADD EMPLOYEE " << endl;
cout << "\t\t\t (2) DISPLAY EMPLOYEE " << endl;
cout << "\t\t\t (3) MODIFY EMPLOYEE " << endl;
cout << "\t\t\t (4) DELETE EMPLOYEE " << endl;
cout << "\t\t\t (5) SEARCH EMPLOYEE " << endl;
cout << "\t\t\t (6) ISSUE BOOK " << endl;
cout << "\t\t\t (7) RETURN BOOK " << endl;
cout << "\t\t\t (8) BACK TO MAIN MENU " << endl;
cout << "\n\n Enter your choice : ";
cin >> ch ;/* read the selection from the keyboard */
switch(ch)
{
case '0': exit(0);
break;
case '1': // Add Employee...
E[++Geid].AddEmployee();
break;
case '2': // Display Employee Details....
if(Geid==0)
{
cout << "\n\n No Employee in Record " << endl;
cout << "\n\n\nWant to perform any other task [Y/N] : " ;
cin >> task;
if (task == 'Y' || task == 'y')
continue;
else
return 0;
}
cout << "\nEnter Employee id : "; // display book id
while(1)
{
cin >> uid;
if(uid==0)
exit(0);
if(uid > Geid || E[uid].age==-1)
57
{
cout << " \n\t!Invalid Employee ID! " << endl;
cout << " \n\tRe-enter Employee ID : " ;
continue;
}
else
break;
}
E[uid].DisplayEmployee();
break;
case '3': // Modify Employee...
if(Geid==0)
{
cout << " \n\nNo Employee in Record " << endl;
cout << "\n\n\nWant to perform any other task [Y/N] : " ;
cin >> task;
if (task == 'Y' || task == 'y')
continue;
else
return 0;
}
cout << "\nEnter Employee id which you want to Modify : ";
while(1)
{
cin >> uid;
if(uid==0)
exit(0);
if(uid > Geid || E[uid].age==-1)
{
cout << " \n\t!Invalid Employee ID! " << endl;
cout << " \n\tRe-enter Employee ID : " ;
continue;
}
else
break;
}
E[uid].ModifyEmployee();
break;
case '4': // Delete Employee...
if(Geid==0)
58
{
cout << "\n\n No Employee in Record " << endl;
cout << "\n\n\nWant to perform any other task [Y/N] : " ;
cin >> task;
if (task == 'Y' || task == 'y')
continue;
else
return 0;
}
int delID;
cout << "Enter ID of Employee you want to Delete from record : ";
while(1)
{
cin >> delID;
if(uid==0)
exit(0);
if(delID > Geid || E[delID].age==-1)
{
cout << " \n\t!Invalid Employee ID! " << endl;
cout << " \n\tRe-enter Employee ID : " ;
continue;
}
else
break;
}
E[delID].DeleteEmployee();
cout << "\n\n\t !Employee successfully removed from record!
"<<endl;
break;
case '5': // Search Employee...
if(Geid==0)
{
cout << "\n\n No Employee in Record " << endl;
cout << "\n\n\nWant to perform any other task [Y/N] : " ;
cin >> task;
if (task == 'Y' || task == 'y')
continue;
else
return 0;
59
}
cout << "\nEnter Employee id which you want to Search : ";
cin >> uid;
if(uid==0)
exit(0);
if(uid > Geid || E[uid].age==-1)
cout << " \n\t !No Employee exists with this ID! " << endl;
else
{
cout << "\n\t !Search Successful! " << endl;
E[uid].SearchEmployee();
}
break;
case '6': // issue book...
if(Geid==0)
{
cout << "\n\n No Employee in Record " << endl;
cout << "\n\n\nWant to perform any other task [Y/N] : " ;
cin >> task;
if (task == 'Y' || task == 'y')
continue;
else
return 0;
}
if(Gbid==0)
{
cout << "\n\n No Books in Record " << endl;
cout << "\n\n\nWant to perform any other task [Y/N] : " ;
cin >> task;
if (task == 'Y' || task == 'y')
continue;
else
return 0;
}
int ueid;
cout << "\n\t Enter Employee ID who want to issue book : ";
while(1)
{
cin >> ueid;
if(uid==0)
60
exit(0);
if(ueid > Geid || E[ueid].age==-1)
{
cout << " \n\t!Invalid Employee ID! " << endl;
cout << " \n\tRe-enter Employee ID : " ;
continue;
}
else
break;
}
cout << "\n\t Enter ID of Book that you want to issue : ";
while(1)
{
int chk=0;
cin >> uid;
if(uid==0)
exit(0);
for(int a=0;a<y;a++)
if(uid==bidarr[a])
chk=1;
if(chk==1)
{
cout << "\n\t Book Already Issued " ;
BookIssuedBy(uid);
cout << "\n\t Re-enter Book ID : " ;
continue;
}
if(uid > Gbid || B[uid].Cost==-1 )
{
cout << " \n\t!Invalid Book ID! " << endl;
cout << " \n\tRe-enter Book ID : " ;
continue;
}
else
break;
}
E[ueid].IssueBook(uid);
break;
61
else
break;
}
cout << "\n\t Enter ID of Book that you want to Return : ";
while(1)
{
cin >> uid;
if(uid==0)
exit(0);
if(uid > Gbid || B[uid].Cost==-1)
{
cout << " \n\t!Invalid Book ID! " << endl;
cout << " \n\tRe-enter Book ID : " ;
continue;
}
else
break;
}
E[ueid].ReturnBook(uid);
default :
cout << "\n No option selected" << endl;
}
if(ch=='8')
{
cont=1;
break;
}
cout << "\n\n\n Want to perform any other task [Y/N] : " ;
cin >> task;
if (task == 'Y' || task == 'y')
continue;
else
return 0;
} // while ends...
if(cont==1)
63
continue;
} //if(menu) ends...
while(1)
64
{
cin >> uid;
if(uid==0)
exit(0);
if(uid > Gbid || B[uid].Cost==-1)
{
cout << " \n\t!Invalid Book ID! " << endl;
cout << " \n\tRe-enter Book ID : " ;
continue;
}
else
break;
}
B[uid].DisplayBook();
break;
case '3': //Modify Book....
if(Gbid==0)
{
cout << " \n\n No Books in Record " << endl;
cout << "\n\n\n Want to perform any other task [Y/N] : " ;
cin >> task;
if (task == 'Y' || task == 'y')
continue;
else
return 0;
}
cout << "\n Enter Book id which you want to Modify : ";
while(1)
{
cin >> uid;
if(uid==0)
exit(0);
if(uid > Gbid || B[uid].Cost==-1)
{
cout << " \n\t!Invalid Book ID! " << endl;
cout << " \n\tRe-enter Book ID : " ;
continue;
}
else
break;
65
}
B[uid].ModifyBook();
break;
case '4': // Delete Book...
if(Gbid==0)
{
cout << "\n\n No Books in Record " << endl;
cout << "\n\n\n Want to perform any other task [Y/N] : " ;
cin >> task;
if (task == 'Y' || task == 'y')
continue;
else
return 0;
}
int delID;
cout << " Enter ID of Book you want to Delete from record : ";
while(1)
{
cin >> delID;
if(delID==0)
exit(0);
int a,chk=0;
for(a=0;a<y;a++)
{
if(delID==bidarr[a])
chk=1;
else ;
}
if(chk)
{
cout << "\n\t Book Issued.....Can't be Deleted " << endl;
cout << "\n\t Re-enter Book ID : " ;
continue;
}
if(delID > Gbid || B[delID].Cost==-1)
{
cout << " \n\t!Invalid Book ID! " << endl;
cout << " \n\tRe-enter Book ID : " ;
continue;
66
}
else
break;
}
B[delID].DeleteBook();
cout << "\n\n\t !Book successfully removed from record! "<<endl;
break;
case '5': //Search Book
if(Gbid==0)
{
cout << "\n\n No Books in Record " << endl;
cout << "\n\n\nWant to perform any other task [Y/N] : " ;
cin >> task;
if (task == 'Y' || task == 'y')
continue;
else
return 0;
}
cout << "\nEnter Book id which you want to Search : ";
cin >> uid;
if(uid > Gbid || B[uid].Cost==-1)
cout << " \n\t !No Book exists with this ID! " << endl;
else
{
cout << "\n\t !Search Successful! " << endl;
B[uid].SearchBook();
}
break;