Book Record Management Project Using C.docx

  • Uploaded by: Neha Vats
  • 0
  • 0
  • August 2019
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Book Record Management Project Using C.docx as PDF for free.

More details

  • Words: 7,989
  • Pages: 62
BOOK RECORD MANAGEMENT SYSTEM USING C LANGAUGE A minor project report submitted in partial fulfillment of the requirement for the Award of degree (MCA 2016-2019 )

Submitted by :

Guided by :

Anshu Sharma

MR.Mukesh Kumar

BHARTI VIDHYAPEETH DEEMED UNIVERSITY SCHOOL OF DISTANCE EDUCATION Academic study center –BVIMR, New Delhi An ISO 9001-2008 Certified institute NAAC Accredited Grade “A” University

1

Student undertaking I Anshu Sharma of MCA(sem 1) would like to declare that the project report entitled “book record management system using c language “submitted to Bhartiya Vidhyapeeth university pune , school of distance education pune, Academic Study Centre BVIMR New Delhi in partial fulfillment of the requirement for the award of the degree . It is an original work carried out by me under the guidance of Mr. Mukesh Kumar . All respected guides, faculty member and other sources have been properly acknowledged and the report contains no plagiarism. To the best of my knowledge and belief the matter embodied in this project is a genuine work done by me and it has been neither submitted for assessment to the university not to any other University for the fulfillment of the requirement of the course of study.

Anshu Sharma

2

INTRODUCTION Book record management system is the system in which we can provided a best service for public in library field. Basically we used manually system in alots of field. But now adays we should increase our service speed. So that we serve everyone who is needy. The Book record management system works for reducing overload of librarian. We can easily search the book and issued the book. All data can be easily managed in this system.

3

ACKNOWLEDGEMENT

I take this opportunity to present my votes of 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 study of this project. I feel great sense of gratitude for ‘MR. Mukesh Kumar ’ under whose able guidance this work has been performed.

Last but not the least, no acknowledge will be complete without mentioning my family and friends. They have also supported me throughout the development of this project.

Anshu Sharma

4

PREFACE This project of “ BOOK RECORD MANAGEMENT” of gives us the complete information about the library. We can enter the record of new books and retrieve the details of books available in the library. We can issue the books to the students and maintain their records and can also check how many books are issued and stock available in the library. In this project we can maintain the late fine of students who returns the issued books after the due date.

Anshu Sharma

5

PROCESS DESCRIPTION The Book record Management System is designed & developed for a receipt and issuance of books in the library along with the student’s details. The books received in the library are entered in Books Entry form and the new student is entered in the student entry form. When the student wants to get the desired book the same is issued on the availability basis to the student. The issuance and due date for the returning of the book is also entered into the Book Issue form under third menu Book Issue. The student has to pay the fine if any on the basis of no. of days delayed deposit of the book in the library.

6

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 analysis is a cross life cycle activity, which has to be continuously performed throughout the system development. By using the creeping commitment approach, feasibility is measured at different times in the system development. This evaluation ensures that the project is beneficial and practical to an organization. Feasibility Test: There are three categories of feasibility tests: I.

Operational Feasibility

II.

Technical Feasibility

III.

Economic Feasibility

OPERATIONAL FEASIBILITY : - is how well the solution will work in the organization and how the end-users and managers feel about the system. This people oriented test measures the urgency of problem or the acceptability of a solution. i.e. Is the problem worth solving? PIECE is used as the basis for analysing the urgency of problem or the effectiveness of a solution. PIECE stands for: P – Performance I – Information E – Economics C – Control E – Efficiency TECHNICAL FEASIBILTY :- centers around the existing computer system and to what extent it can support the proposed system. ECONOMICAL FEASIBILTY includes the cost – benefit analysis. That is to determine whether the procedure to be applied is benefits and savings are expected from the candidate system. After gathering all the details of the existing system a lot of problems come to light. The user stated problems are as follows: 7

1. Difficulty in finding any information about the food items at any instance. 2. Lack of appropriate report to submit the management on demand due to large manual processing done on various relevant registers. 3. Difficulty in calculation of total bill. 4. Long processing taken at the peak hours. As a result poor performance of the system causes dissatisfaction. 5. Difficulty in updating of the items purchased. Financial loss due to late manual report generation. SOFTWARE PROCESS MODEL There are various orders in which the six phases of the Structured Systems Analysis Design Methodology (SSADM) are implemented. These are what we know as software process models. A software process model is a development strategy we incorporate to describe how a set of activities (the six phases of SSADM) must be performed and in which order to get the desired output. We already have a few process models defined and described. They are: (i)

Code And Fix Model

(ii)

Waterfall Model

(iii)

Evolutionary Model

(iv)

Transformation Model

(v)

Spiral Method

To select the best model for the project all the above mentioned models is to be evaluated. After evaluation the following assessment is realized. The Code and Fix Model can actually be considered no model at all as there is nothing rigid and the developer has to follow his inspirations. The Evolutionary model is increment driven and a kind of trial and error method. The Transformation model can be called specification driven, as the development process occurs through iterative refinement of formal specifications.

Spiral model is a meta model that may be called risk driven. Since, there is time constraint, trial and error and risk driven models are eliminated. The project must have documentation and this feature is facilitated only by the Waterfall model. 8

The model is briefly described now which will facilitate the reader to follow the exact path I am going to follow in the development of the system.

Requirement Analysis  OBJECTIVE  PRELIMINARY SURVEY  REQUIREMENT SPECIFICATIONS  PERFORMANCE CRITERIA  SYSTEM HARDWARE AND SOFTWARE REQUIRED

9

Objective The problem forwarded by the client is actually to computerize their already existing manual System. Preliminary Survey The client already had a set system which was manual. This manual system was although efficient, but very time consuming. Also, the different modules were not fully integrated and needed an absolute understanding of the whole system to give the desired results. The main problems found out were bottlenecks at the user end because of slow data flow rate in a manual system. So, a preliminary survey was done check whether any simple modification could actually stimulate the system. The present system seemed to be perfect if only data flow could be automated. The same modules could be implemented in the software. Requirement Specifications After the preliminary survey and listening to the client’s requirements following requirements were listed: 

To develop a billing system.



The present manual system being employed should be selected as the client system.



The system should ensure that a quick response is given to user quires in areas of requests.



A simple user interface should provide to the user to easy access to requested information.



The front-end should have user friendly interface.



Every transaction should be dealt with in minimum delay.



The system should be able to provide any information at any time.



Proper relationship between tables should be maintained so that data integrity is maintained.



Main module should have a password to avoid trespassing by unauthorized users.

Performance Criteria

10

After the initial investigation of the present system and the client’s requirements some performance criteria were deduced. These criteria cover both the software and the hardware aspect of the project.

System Hardware and Software Required After knowing the performance criteria, it became fairly easy to decide on the hardware and software platform. The next step was to decide which software to use in order to develop and support the system. Microsoft Windows XP professional was a fair choice. Then, to choose the language various alternatives were checked. Prog. language ‘C’ LANGUAGE is used.

11

Software Requirements: Software Req.

:

Turbo C

Software Language use

:

‘C’

RAM

:

Minimum 32 Mb

Operating Platform

:

Win 9x/2000/XP

Hard Disk

:

Minimum 20 GB

Processor

:

Pentium Series

Hardware Requirements: Processor: Any Pentium or Equivalent Machine RAM

:

256 MB

HDD

:

4.1 GB

FDD

:

1.44 MB

CD-ROM

:

52X

Monitor

:

14 inches Color Monitor

Keyboard

:

104 Keys Keyboards.

12

SYSTEM ANALYSIS  OVERALL STRATEGY  PROBLEMS WITH THE CURRENT SYSTEM  ADVANTAGES OF COMPUTERIZATION  DATA FLOW ANALYSIS OF THE CURRENT SYSTEM

System Analysis 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. In order to have a structured approach to the analysis stage I had to choose a methodology to follow to have a complete analysis stage. The analysis stage is probably the most important as a mistake or missed requirement from analysis phase may cost much more time and money to fix later than if it had been caught in the analysis phase. Therefore it is imperative that at the analysis stage the best job possible is made. This section outlines the strategies followed in organizing the analysis

13

phase.

Overall Strategy To understand the current processes for the Library Management System, I developed the following strategy: 

Sample all documents and records of information.



Observe actual procedures followed.



Determine the current strategies.

Problems 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”. o The speed of the system depends on human speed and mood. o Since it is totally depending on human, efficiency is low. o 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.

Advantages of Computerization Upon computerizing the present system, it will become an organized one. Efficiency will increase and so will data flow speed. Another advantage of computerization is security. Since main login process will have a password, unauthorized person will not be able to access any information.

14

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.

System Design  DESIGN ANALYSIS  ENTITY RELATIONSHIP DIAGRAM  DATA FLOW DIAGRAM  DATA DICTIONARY

Design Analysis After understanding the business functions, purpose of the database, the performance needs of the application and the ease of maintenance, the designing part begins. A good design is the foundation to a correct, easily expandable and maintainable system. A maintainable system is one that is flexible and is simple to modify, if the system cannot adapt easily to the changing business environment, exceedingly efforts will be required to keep it serviceable. Design is a procedure for creating the blueprints for a system like the architects draft for the constructor to create the building.

Entity Relationship Diagram Entities are related by relationships between common information, where relationship at any point in time is an association between two entities. The ER diagram is a technique that is useful in the designing phase to represent this logical part of the database. Since the entities had been identified in the analysis stage the only process left to build an ER diagram is to represent the relations.

15

Designing the ER diagram took several drafts before the final version was complete.

(E R Diagram)

Book Database Attributes Book_id

Datatype Number 16

Book Name Author Name Price No. of Copies

Char Char Number Number

Student Database

Attributes Student id Student Name Student Address Student Phn No.

Datatype Number Char Char Number

17

Account Database

Attributes Book_id Student_id Issue Date Return_date Fine

Datatype Number Number Date Date Number

Data flow diagram (DFD) DFD or Data Flow Graphs are the cornerstone for structured systems analysis and design. It views the system as a collection of functions that transforms the inputs as desired outputs but does not go into the details of the transformation. This process modeling tool depicts flow of data through a system and processing work performed by the system. It has diagram of processes, data stores, data stores view, entities and data flows. Although data can be organized in several ways: 

stored in data repositories



flow in data flows



transferred to and from the external environment

DFD is preferred here as it can be expressed by means of an attractive graphical notation that makes them easy to use and understand. The four entities that must be represented are: Data flows - movement of data in the system Data stores - data repositories for data that is not moving Processes - transforms of incoming data flow(s) to outgoing data flow(s) External entities - sources or destinations outside the specified system boundary

18

Data flow diagrams are made up of a number of symbols, which represent the system components. Most data flow modeling methods use four kinds of symbols are used to represents four kings of system components: Process Data Stores, Data Flows and External Entries. These are as follows:

Process

External Entity

Data Flow

Process: Processes show what the system does. Each process has one or more data inputs and produces one or more data outputs. Processes are represented by circles in DFD.

Data Stores: A file or data store is repository of data. They contain data that is retained in the system. Processing can enter data into a data store or retrieve data from the data store. Each data store is represented by a thin line in the DFD and each data store has unique name.

External Entities: External entities are outside the system but they either supply input data into the system or they use the system output. The designer has no control over the external entities. External entities are represented by a square or rectangle.

Following are the basic elements of a DFD which are used in the DFD of the project:

The function symbol (bubble)

19

20

The DFDs for the current system is given here:

0 LEVEL DFD

21

1 LEVEL DFD

22

2 LEVEL DFD

2 LEVEL DFD

23

2 LEVEL DFD

24

2 LEVEL DFD

25

Data Dictionary 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:

SYSTEM TESTING AND IMPLEMENTATION: 10.1 Testing Even completion of the design and coding stage does not imply that the development of the software is complete. The system designed needs to be verified so that errors don’t creep in, although it is inevitable to develop a system without any errors. The project was under constant scrutiny to ensure that its implementation was not deviating from the original plan, and that functions that were implemented were doing their jobs correctly. The main functions of the system or user options on which testing were done can be summarized as follows: 

Retrieve a item detail from the database.



Add a new items’ detail to the database.



Generate detailed information about the transactions.

Each of these functions would need to ensure that they do only just what the user requests, and not something other than that. The system that has been implemented will need to stimulate typical situations that are currently being frequently performed manually at the home, as well as so typical ones. As will explain later, these typical cases were tested more thoroughly than a typical one.

26

The main objective of the testing is to show the presence of bugs, not the absence. No absolute certainty can be gained from the testing. The testing just ensures that the candidate system is an efficient alternative to the present system. The cautions kept in mind while choosing the tests are: 1.

The testing should be based on sound and systematic techniques.

2.

Testing should help locate errors, not just detect their presence.

3.

Testing should be repeatable, i.e., repeating the same experiment, supplying the same input data to the same piece of code, produces the same results.

The tests done on the designed software was to verify the following properties of the software: 

Correctness(satisfaction of the specifications)



Reliability(how well it meets the requirements)



Portability (running in different environments)



Usability (ease with which user can use the software)



Maintainability (modifications after initial release), etc.

Unit Testing Individual components are tested to ensure that they operate correctly. Unit testing treats each component as a stand-alone entity which does not need other components during the testing process. In my project, every single menu checked individually.

System Testing System testing is actually a series of different tests whose primary purpose is to fully exercise the computer based system. The testing verifies that all elements mesh properly and that overall system function/performance is achieved.

Test conclusion

27

After all the tests on the designed software to verify its various qualities following conclusions were attained: 

Correctness: The designed software meets the functional requirements specifications to a fair degree of correctness.



Reliability: Based on the test data, the client termed the software reliable. Robustness: The various message and error codes enhanced the robustness of the

software.

28

DOCUMENTATION

The first libraries were composed for the most part of unpublished records, a particular type of library called archives. Archaeological findings from the ancient city-states of Sumer have revealed temple rooms full of clay tablets in cuneiform script. These archives were made up almost completely of the records of commercial transactions or inventories, with only a few documents touching theological matters, historical records or legends. Things were much the same in the government and temple records on papyrus of Ancient Egypt. The earliest discovered private archives were kept at Ugarit; besides correspondence and inventories, texts of myths may have been standardized practice-texts for teaching new scribes. Private or personal libraries made up of non-fiction and fiction books (as opposed to the state or institutional records kept in archives) first appeared in classical Greece. The first ones appeared some time near the 5th century BC. The celebrated book collectors of Hellenistic Antiquity were listed in the late second century in Deipnosophistae. The first libraries were composed for the most part of unpublished records, a particular type of library called archives. Archaeological findings from the ancient city-states of Sumer have revealed temple rooms full of clay tablets in cuneiform script. These archives were made up almost completely of the records of commercial transactions or inventories, with only a few documents touching theological matters, historical records or legends. Things were much the same in the government and temple records on papyrus of Ancient Egypt. The earliest discovered private archives were kept at Ugarit; besides correspondence and inventories, texts of myths may have been standardized practice-texts for teaching new scribes. Private or personal libraries made up of non-fiction and fiction books (as opposed to the state or institutional records kept in archives) first appeared in classical Greece. The first ones appeared some time near the 5th century BC. The celebrated book collectors of Hellenistic Antiquity were listed in the late second century in Deipnosophistae.

29

All these libraries were Greek; the cultivated Hellenized diners in Deipnosophistae pass over the libraries of Rome in silence. At the Villa of the Papyri at Herculaneum, apparently the villa of Caesar's father-in-law, the Greek library has been partly preserved in volcanic ash; archaeologists speculate that a Latin library, kept separate from the Greek one, may await discovery at the site. Libraries were filled with parchment scrolls as at Pergamum and on papyrus scrolls as at Alexandria: export of prepared writing materials was a staple of commerce. There were a few institutional or royal libraries like the Library of Alexandria which were open to an educated public, but on the whole collections were private. In those rare cases where it was possible for a scholar to consult library books there seems to have been no direct access to the stacks. In all recorded cases the books were kept in a relatively small room where the staff went to get them for the readers, who had to consult them in an adjoining hall or covered walkway. Little is known about early Chinese libraries, save what is written about the imperial library which began with the Qin Dynasty. One of the curators of the imperial library in the Han Dynasty is believed to have been the first to establish a library classification system and the first book notation system. At this time the library catalog was written on scrolls of fine silk and stored in silk bags. There is also evidence of those libraries at Nippur of about 1900 B.C. and those at Nineveh of about 700 B.C. as showing a library classification system. In Persia many libraries were established by the Zoroastrian elite and the Persian Kings. Among the first ones was a royal library in Isfahan. One of the most important public libraries established around 667 AD in south-western Iran was the Library of Gundishapur. It was a part of a bigger scientific complex located at the Academy of Gundishapur. In the West, the first public libraries were established under the Roman Empire as each succeeding emperor strove to open one or many which outshone that of his predecessor. Unlike the Greek libraries, readers had direct access to the scrolls, which were kept on shelves built into the walls of a large room. Reading or copying was normally done in the room itself. The surviving records give only a few instances of lending features. As a rule Roman public libraries were bilingual: they had a Latin room and a Greek room. Most of the large Roman baths were

30

also cultural centers, built from the start with a library, with the usual two room arrangement for Greek and Latin texts. In the sixth century, at the very close of the Classical period, the great libraries of the Mediterranean world remained those of Constantinople and Alexandria. Cassiodorus, minister to Theodoric, established a monastery at Vivarium in the heel of Italy with a library where he attempted to bring Greek learning to Latin readers and preserve texts both sacred and secular for future generations. As its unofficial librarian, Cassiodorus not only collected as many manuscripts as he could, he also wrote treatises aimed at instructing his monks in the proper uses of reading and methods for copying texts accurately. In the end, however, the library at Vivarium was dispersed and lost within a century. Elsewhere in the Early Middle Ages, after the fall of the Western Roman Empire and before the rise of the large Western Christian monastery libraries beginning at Montecassino, libraries were found in scattered places in the Christian Middle East. Upon the rise of Islam, libraries in newly Islamic lands knew a brief period of expansion in the Middle East, North Africa, Sicily and Spain. Like the Christian libraries, they mostly contained books which were made of paper, and took a codex or modern form instead of scrolls; they could be found in mosques, private homes, and universities. In Aleppo, for example the largest and probably the oldest mosque library, the Sufiya, located at the city's Grand Umayyad Mosque, contained a large book collection of which 10 000 volumes were reportedly bequeathed by the city's most famous ruler, Prince Sayf al-Dawla. Some mosques sponsored public libraries. Ibn al-Nadim's bibliography Fihrist demonstrates the devotion of medieval Muslim scholars to books and reliable sources; it contains a description of thousands of books circulating in the Islamic world circa 1000, including an entire section for books about the doctrines of other religions. Unfortunately, modern Islamic libraries for the most part do not hold these antique books; many were lost, destroyed by Mongols, or removed to European libraries and museums during the colonial period. By the 8th century first Iranians and then Arabs had imported the craft of paper making from China, with a mill already at work in Baghdad in 794. By the 9th century completely public libraries started to appear in many Islamic cities. They were called "halls of Science" or dar al'ilm. They were each endowed by Islamic sects with the purpose of representing their tenets as 31

well as promoting the dissemination of secular knowledge. The 9th century Abbasid Caliph alMutawakkil of Iraq, even ordered the construction of a ‘zawiyat qurra literally an enclosure for readers which was `lavishly furnished and equipped.' In Shiraz Adhud al-Daula (d. 983CE) set up a library, described by the medieval historian, al-Muqaddasi, as`a complex of buildings surrounded by gardens with lakes and waterways. The buildings were topped with domes, and comprised an upper and a lower story with a total, according to the chief official, of 360 rooms.... In each department, catalogues were placed on a shelf... the rooms were furnished with carpets...'.

[8]

The libraries often employed translators and copyists in large numbers, in order to

render into Arabic the bulk of the available Persian, Greek and Roman non-fiction and the classics of literature. This flowering of Islamic learning ceased after a few centuries as the Islamic world began to turn against experimentation and learning. After a few centuries many of these libraries were destroyed by Mongolian invasion. Others were victim of wars and religious strife in the Islamic world. However, a few examples of these medieval libraries, such as the libraries of Chinguetti in West Africa, remain intact and relatively unchanged even today. Another ancient library from this period which is still operational and expanding is the Central Library of Astan Quds Razavi in the Iranian city of Mashhad, which has been operating for more than six centuries. The contents of these Islamic libraries were copied by Christian monks in Muslim/Christian border areas, particularly Spain and Sicily. From there they eventually made their way into other parts of Christian Europe. These copies joined works that had been preserved directly by Christian monks from Greek and Roman originals, as well as copies Western Christian monks made of Byzantine works. The resulting conglomerate libraries are the basis of every modern library today. Medieval library design reflected the fact that these manuscripts--created via the laborintensive process of hand copying--were valuable possessions. Library architecture developed in response to the need for security. Librarians often chained books to lecterns, armaria (wooden chests), or shelves, in well-lit rooms. Despite this protectiveness, many libraries were willing to lend their books if provided with security deposits (usually money or a book of equal value). Monastic libraries lent and borrowed books from each other frequently and lending policy was often theologically grounded. For example, the Franciscan monasteries loaned books to each

32

other without a security deposit since according to their vow of poverty only the entire order could own property. In 1212 the council of Paris condemned those monasteries that still forbade loaning books, reminding them that lending is "one of the chief works of mercy." The early libraries located in monastic cloisters and associated with scriptoria were collections of lecterns with books chained to them. Shelves built above and between back-toback lecterns were the beginning of bookpresses. The chain was attached at the fore-edge of a book rather than to its spine. Book presses came to be arranged in carrels (perpendicular to the walls and therefore to the windows) in order to maximize lighting, with low bookcases in front of the windows. This stall system (fixed bookcases perpendicular to exterior walls pierced by closely spaced windows) was characteristic of English institutional libraries. In Continental libraries, bookcases were arranged parallel to and against the walls. This wall system was first introduced on a large scale in Spain's El Escorial. A number of factors combined to create a "golden age of libraries" between 16 and 1700: The quantity of books had gone up, as the cost had gone down, there was a renewal in the interest of classical literature and culture, nationalism was encouraging nations to build great libraries, universities were playing a more prominent role in education, and renaissance thinkers and writers were producing great works. Some of the more important libraries include the Bodleian Library at Oxford, the Library of the British Museum, the Mazarine Library in Paris, and the National Central Library in Italy, the Prussian State Library, the German State Library, the M.E. Saltykov-Schedrin State Public Library of St. Petersburg, and many more. The earliest example in England of a library to be endowed for the benefit of users who were not members of an institution such as a cathedral or college was the Francis Trigge Chained Library in Grantham, Lincolnshire, established in 1598. The library still exists and can justifiably claim to be the forerunner of later public library systems.The beginning of the modern, free, open access libraries really got its start in the U.K. in 1847. Congress appointed a committee, lead by, William Ewart, on Public Libraries to consider the necessity of establishing libraries through the nation: In 1849 their report noted the poor condition of library service, it recommended the establishment of free public libraries all over the country, and it lead to the Public Libraries Act in 1850, which allowed all cities with populations exceeding 10,000 to levy taxes for the support of public libraries. Another important act was the 1870 Public School Law, which increased 33

literacy, thereby the demand for libraries, so by 1877, 75+ cities had established free libraries, and by 1900 the number had reached 300. This finally marks the start of the public library as we know it. And, these acts lead to similar laws in other countries, most notably the U.S. 1876 is a well known year in the history of librarianship. The American Library Association was formed, as well as The American Library Journal, Melvil Dewey published his decimal based system of classification, and the United States Bureau of Education published its report, "Public libraries in the United States of America; their history, condition, and management." The American Library Association continues to play a Minor role in libraries to this day, and Dewey's classification system, although under heavy criticism of late, still remains as the prevailing method of classification used in the United States. As the number of books in libraries increased, so did the need for compact storage and access with adequate lighting, giving birth to the stack system, which involved keeping a library's collection of books in a space separate from the reading room, an arrangement which arose in the 19th century. Book stacks quickly evolved into a fairly standard form in which the cast iron and steel frameworks supporting the bookshelves also supported the floors, which often were built of translucent blocks to permit the passage of light (but were not transparent, for reasons of modesty). With the introduction of electrical lighting, it had a huge impact on how the library operated. Also, the use of glass floors was largely discontinued, though floors were still often composed of metal grating to allow air to circulate in multi-story stacks. Ultimately, even more space was needed, and a method of moving shelves on tracks (compact shelving) was introduced to cut down on otherwise wasted aisle space. Library 2.0, a term coined in 2005, is the library's response to the challenge of Google, and an attempt to meet the changing needs and wants of the users, using web 2.0 technology. Some of the aspects of Library 2.0 include, commenting, tagging, bookmarking, discussions, using social software, plug-ins, and widgets. Inspired by web 2.0, it is an attempt to make the library a more user driven institution.

scope

34

Library patrons may not know how to use a library effectively. This can be due to lack of early exposure, shyness, or anxiety and fear of displaying ignorance. In United States public libraries, beginning in the 19th century these problems drove the emergence of the library instruction movement, which advocated library user education. One of the early leaders was John Cotton Dana. The basic form of library instruction is generally known as information literacy. Libraries inform their users of what materials are available in their collections and how to access that information. Before the computer age, this was accomplished by the card catalog — a cabinet containing many drawers filled with index cards that identified books and other materials. In a large library, the card catalog often filled a large room. The emergence of the Internet, however, has led to the adoption of electronic catalog databases (often referred to as "webcats" or as OPACs, for "online public access catalog"), which allow users to search the library's holdings from any location with Internet access. This style of catalog maintenance is compatible with new types of libraries, such as digital libraries and distributed libraries, as well as older libraries that have been retrofitted. Electronic catalog databases are disfavored by some who believe that the old card catalog system was both easier to navigate and allowed retention of information, by writing directly on the cards, that is lost in the electronic systems. This argument is analogous to the debate over paper books and e-books. While they have been accused of precipitously throwing out valuable information in card catalogs, most modern libraries have nonetheless made the movement to electronic catalog databases. Large libraries are scattered across multiple buildings across a town, each having multiple floors, with multiple rooms with a lot of shelfs. After the user found a book in the catalog the user is forced to wade through another stack of lists, manuals, and maps and then navigate through erratic floor layouts to the real book. GPS coordinates might help in this respect. Finland has the highest number of registered book borrowers per capita in the world. Over half of Finland's population are registered borrowers.

Library management Basic tasks in library management include the planning of acquisitions (which materials the library should acquire, by purchase or otherwise), library classification of acquired materials, preservation of materials (especially rare and fragile archival materials such as manuscripts), the 35

deaccessioning of materials, patron borrowing of materials, and developing and administering library computer systems. More long-term issues include the planning of the construction of new libraries or extensions to existing ones, and the development and implementation of outreach services and reading-enhancement services (such as adult literacy and children's programming).

Integrated Library System An integrated library system, or ILS, is an enterprise resource planning system for a library, used to track items owned, orders made, bills paid, and patrons who have borrowed. An ILS is usually comprised of a relational database, software to act on that database, and two graphical user interfaces (one for patrons, one for staff). Most ILSes separate software functions into discrete programs called modules, which are then integrated into a unified interface. Examples of modules include: acquisitions (ordering, receiving, and invoicing materials), cataloging (classifying and indexing materials), circulation (lending materials to patrons and receiving them back), serials (tracking magazine and newspaper holdings), and the OPAC (public interface for users). Each patron and item has a unique ID in the database that allows the ILS to track its activity. Larger libraries use ILSes to order and acquire, receive and invoice, catalog, circulate, track and shelve materials. Smaller libraries, such as private homes or non-profit organizations (e.g. churches and synagogues), often forego the expense and maintenance required to run an ILS, and instead use a library computer system. Most sizable First World libraries use an ILS. In the United Kingdom, ILSes are sometimes referred to as "library management systems ILSes were often known as library automation systems or automated systems in the 1970s and early 1980s. Before the advent of computers, libraries usually used a card catalog to index its holdings. Computers were used to automate the card catalog, thus the term automation system. Automation of the catalog saves the labor involved in resorting the card catalog, keeping it up-to-date with respect to the collection, etc. Other tasks automated include checking out and

36

checking in books, generating statistics and reports, acquisitions and subscriptions, indexing journal articles and linking to them, as well as tracking interlibrary loans. Since the late 1980s, windows and multi-tasking have allowed business functions to be integrated. Instead of having to open up separate applications, library staff could now use a single application with multiple functional modules. As the Internet grew, ILS vendors offered more functionality related to the Internet. Minor ILS systems now offer web-based portals where library users can log in to view their account, renew their books, and be authenticated to use online databases. Today's new systems tend to be completely web-based, i.e. all work operations by the librarians are carried out in a web browser.

.

37

Source code

#include <windows.h> #include<stdio.h> #include

//contains delay(),getch(),gotoxy(),etc.

#include <stdlib.h> #include<string.h>

//contains strcmp(),strcpy(),strlen(),etc

#include

//contains toupper(), tolower(),etc

#include<dos.h>

//contains _dos_getdate

#include #define RETURNTIME 15 //list of function prototype char catagories[][15]={"Computer","Electronics","Electrical","Civil","Mechnnic al","Architecture"}; void returnfunc(void); void mainmenu(void); void addbooks(void); void deletebooks(void); void editbooks(void); void searchbooks(void); void issuebooks(void); void viewbooks(void); void closeapplication(void); int getdata(); int checkid(int); int t(void); //void show_mouse(void); void Password(); void issuerecord(); void loaderanim(); COORD coord = {0, 0}; // sets coordinates to 0,0 //COORD max_buffer_size = GetLargestConsoleWindowSize(hOut);

38

COORD max_res,cursor_size; void gotoxy (int x, int y) { coord.X = x; coord.Y = y; // X and Y coordinates SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE), coord); } void delay(unsigned int mseconds) { clock_t goal = mseconds + clock(); while (goal > clock()); } //list of global files that can be acceed form anywhere in program FILE *fp,*ft,*fs; //list of global variable int s; char findbook; char password[10]={"codechamp"};

struct meroDate { int mm,dd,yy; }; struct books { int id; char stname[20]; char name[20]; char Author[20]; int quantity; float Price; int count; int rackno; char *cat; struct meroDate issued; struct meroDate duedate; };

39

struct books a; int main() { Password(); getch(); return 0; } void mainmenu() { //loaderanim(); system("cls"); //

textbackground(13);

int i; gotoxy(20,3); printf("\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2 MAIN MENU"); printf(" \xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2"); gotoxy(20,5); printf("\xDB\xDB\xDB\xDB\xB2 1. Add Books

");

gotoxy(20,7); printf("\xDB\xDB\xDB\xDB\xB2 2. Delete books"); gotoxy(20,9); printf("\xDB\xDB\xDB\xDB\xB2 3. Search Books"); gotoxy(20,11); printf("\xDB\xDB\xDB\xDB\xB2 4. Issue Books"); gotoxy(20,13); printf("\xDB\xDB\xDB\xDB\xB2 5. View Book list"); gotoxy(20,15); printf("\xDB\xDB\xDB\xDB\xB2 6. Edit Book's Record"); gotoxy(20,17); printf("\xDB\xDB\xDB\xDB\xB2 7. Close Application"); gotoxy(20,19); printf("------------------------------------------"); gotoxy(20,20); t(); gotoxy(20,21); printf("Enter your choice:"); switch(getch())

40

{ case '1': addbooks(); break; case '2': deletebooks(); break; case '3': searchbooks(); break; case '4': issuebooks(); break; case '5': viewbooks(); break; case '6': editbooks(); break; case '7': { system("cls"); gotoxy(16,3); printf("Thanks for using the Program.."); gotoxy(10,7); printf("Exiting in 5 second...........>"); //flushall(); delay(5000); exit(0); } default: { gotoxy(10,23); printf("\aWrong Entry!!Please re-entered correct option"); if(getch()) mainmenu(); } } }

41

void addbooks(void)

//funtion that add books

{ system("cls"); int i; gotoxy(20,5); printf("\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2SELECT CATEGOIES"); printf("\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2"); gotoxy(20,7); printf("\xDB\xDB\xDB\xDB\xB2 1. Computer"); gotoxy(20,9); printf("\xDB\xDB\xDB\xDB\xB2 2. Electronics"); gotoxy(20,11); printf("\xDB\xDB\xDB\xDB\xB2 3. Electrical"); gotoxy(20,13); printf("\xDB\xDB\xDB\xDB\xB2 4. Civil"); gotoxy(20,15); printf("\xDB\xDB\xDB\xDB\xB2 5. Mechanical"); gotoxy(20,17); printf("\xDB\xDB\xDB\xDB\xB2 6. Architecture"); gotoxy(20,19); printf("\xDB\xDB\xDB\xDB\xB2 7. Back to main menu"); gotoxy(20,21); printf("\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\ xB2\xB2\xB2"); printf("\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\ xB2\xB2\xB2"); gotoxy(20,22); printf("Enter your choice:"); scanf("%d",&s); if(s==7) mainmenu() ; system("cls"); fp=fopen("Bibek.dat","ab+"); if(getdata()==1) { a.cat=catagories[s-1]; fseek(fp,0,SEEK_END); fwrite(&a,sizeof(a),1,fp); fclose(fp); gotoxy(21,14);

42

printf("The record is sucessfully saved"); gotoxy(21,15); printf("Save any more?(Y / N):"); if(getch()=='n') mainmenu(); else system("cls"); addbooks(); } } void deletebooks()

//function that delete items from file fp

{ system("cls"); int d; char another='y'; while(another=='y')

//infinite loop

{ system("cls"); gotoxy(10,5); printf("Enter the Book ID to

delete:");

scanf("%d",&d); fp=fopen("Bibek.dat","rb+"); rewind(fp); while(fread(&a,sizeof(a),1,fp)==1) { if(a.id==d) { gotoxy(10,7); printf("The book record is available"); gotoxy(10,8); printf("Book name is %s",a.name); gotoxy(10,9); printf("Rack No. is %d",a.rackno); findbook='t'; } } if(findbook!='t') { gotoxy(10,10); printf("No record is found modify the search");

43

if(getch()) mainmenu(); } if(findbook=='t' ) { gotoxy(10,9); printf("Do you want to delete it?(Y/N):"); if(getch()=='y') { ft=fopen("test.dat","wb+");

//temporary file for delete

rewind(fp); while(fread(&a,sizeof(a),1,fp)==1) { if(a.id!=d) { fseek(ft,0,SEEK_CUR); fwrite(&a,sizeof(a),1,ft); //write all in tempory file except that }

//we want to delete

} fclose(ft); fclose(fp); remove("Bibek.dat"); rename("test.dat","Bibek.dat"); //copy all item from temporary file to fp except that fp=fopen("Bibek.dat","rb+");

//we want to delete

if(findbook=='t') { gotoxy(10,10); printf("The record is sucessfully deleted"); gotoxy(10,11); printf("Delete another record?(Y/N)"); } } else mainmenu(); fflush(stdin); another=getch(); } } gotoxy(10,15); mainmenu();

44

} void searchbooks() { system("cls"); int d; printf("*****************************Search Books*********************************"); gotoxy(20,10); printf("\xDB\xDB\xDB\xB2 1. Search By ID"); gotoxy(20,14); printf("\xDB\xDB\xDB\xB2 2. Search By Name"); gotoxy( 15,20); printf("Enter Your Choice"); fp=fopen("Bibek.dat","rb+"); //open file for reading propose rewind(fp);

//move pointer at the begining of file

switch(getch()) { case '1': { system("cls"); gotoxy(25,4); printf("****Search Books By Id****"); gotoxy(20,5); printf("Enter the book id:"); scanf("%d",&d); gotoxy(20,7); printf("Searching........"); while(fread(&a,sizeof(a),1,fp)==1) { if(a.id==d) { delay(2); gotoxy(20,7); printf("The Book is available"); gotoxy(20,8); printf("\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2" ); printf("\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2" ); gotoxy(20,9); printf("\xB2 ID:%d",a.id);gotoxy(47,9);printf("\xB2"); gotoxy(20,10);

45

printf("\xB2 Name:%s",a.name);gotoxy(47,10);printf("\xB2"); gotoxy(20,11); printf("\xB2 Author:%s ",a.Author);gotoxy(47,11);printf("\xB2"); gotoxy(20,12); printf("\xB2 Qantity:%d ",a.quantity);gotoxy(47,12);printf("\xB2"); gotoxy(47,11);printf("\xB2"); gotoxy(20,13); printf("\xB2 Price:Rs.%.2f",a.Price);gotoxy(47,13);printf("\xB2"); gotoxy(20,14); printf("\xB2 Rack No:%d ",a.rackno);gotoxy(47,14);printf("\xB2"); gotoxy(20,15); printf("\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2" ); printf("\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2" ); findbook='t'; } } if(findbook!='t')

//checks whether conditiion enters inside loop or

not { gotoxy(20,8); printf("\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\ xB2\xB2\xB2\xB2"); gotoxy(20,9);printf("\xB2");

gotoxy(38,9);printf("\xB2");

gotoxy(20,10); printf("\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\ xB2\xB2\xB2\xB2"); gotoxy(22,9);printf("\aNo Record Found"); } gotoxy(20,17); printf("Try another search?(Y/N)"); if(getch()=='y') searchbooks(); else mainmenu(); break; } case '2': { char s[15];

46

system("cls"); gotoxy(25,4); printf("****Search Books By Name****"); gotoxy(20,5); printf("Enter Book Name:"); scanf("%s",s); int d=0; while(fread(&a,sizeof(a),1,fp)==1) { if(strcmp(a.name,(s))==0) //checks whether a.name is equal to s or not { gotoxy(20,7); printf("The Book is available"); gotoxy(20,8); printf("\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2" ); printf("\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2" ); gotoxy(20,9); printf("\xB2 ID:%d",a.id);gotoxy(47,9);printf("\xB2"); gotoxy(20,10); printf("\xB2 Name:%s",a.name);gotoxy(47,10);printf("\xB2"); gotoxy(20,11); printf("\xB2 Author:%s",a.Author);gotoxy(47,11);printf("\xB2"); gotoxy(20,12); printf("\xB2 Qantity:%d",a.quantity);gotoxy(47,12);printf("\xB2"); gotoxy(20,13); printf("\xB2 Price:Rs.%.2f",a.Price);gotoxy(47,13);printf("\xB2"); gotoxy(20,14); printf("\xB2 Rack No:%d ",a.rackno);gotoxy(47,14);printf("\xB2"); gotoxy(20,15); printf("\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2" ); printf("\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2" ); d++; } } if(d==0)

47

{ gotoxy(20,8); printf("\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\ xB2\xB2\xB2\xB2"); gotoxy(20,9);printf("\xB2");

gotoxy(38,9);printf("\xB2");

gotoxy(20,10); printf("\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\ xB2\xB2\xB2\xB2"); gotoxy(22,9);printf("\aNo Record Found"); } gotoxy(20,17); printf("Try another search?(Y/N)"); if(getch()=='y') searchbooks(); else mainmenu(); break; } default : getch(); searchbooks(); } fclose(fp); } void issuebooks(void)

//function that issue books from library

{ int t; system("cls"); printf("********************************ISSUE SECTION**************************"); gotoxy(10,5); printf("\xDB\xDB\xDB\xDb\xB2 1. Issue a Book"); gotoxy(10,7); printf("\xDB\xDB\xDB\xDb\xB2 2. View Issued Book"); gotoxy(10,9); printf("\xDB\xDB\xDB\xDb\xB2 3. Search Issued Book"); gotoxy(10,11); printf("\xDB\xDB\xDB\xDb\xB2 4. Remove Issued Book"); gotoxy(10,14); printf("Enter a Choice:");

48

switch(getch()) { case '1':

//issue book

{ system("cls"); int c=0; char another='y'; while(another=='y') { system("cls"); gotoxy(15,4); printf("***Issue Book section***"); gotoxy(10,6); printf("Enter the Book Id:"); scanf("%d",&t); fp=fopen("Bibek.dat","rb"); fs=fopen("Issue.dat","ab+"); if(checkid(t)==0) //issues those which are present in library { gotoxy(10,8); printf("The book record is available"); gotoxy(10,9); printf("There are %d unissued books in library ",a.quantity); gotoxy(10,10); printf("The name of book is %s",a.name); gotoxy(10,11); printf("Enter student name:"); scanf("%s",a.stname); // struct dosdate_t d; //for current date // _dos_getdate(&d); // a.issued.dd=d.day; // a.issued.mm=d.month; //a.issued.yy=d.year; gotoxy(10,12); printf("Issued date=%d-%d%d",a.issued.dd,a.issued.mm,a.issued.yy); gotoxy(10,13); printf("The BOOK of ID %d is issued",a.id); a.duedate.dd=a.issued.dd+RETURNTIME; a.duedate.mm=a.issued.mm;

49

//for return date

a.duedate.yy=a.issued.yy; if(a.duedate.dd>30) { a.duedate.mm+=a.duedate.dd/30; a.duedate.dd-=30; } if(a.duedate.mm>12) { a.duedate.yy+=a.duedate.mm/12; a.duedate.mm-=12; } gotoxy(10,14); printf("To be return:%d-%d%d",a.duedate.dd,a.duedate.mm,a.duedate.yy); fseek(fs,sizeof(a),SEEK_END); fwrite(&a,sizeof(a),1,fs); fclose(fs); c=1; } if(c==0) { gotoxy(10,11); printf("No record found"); } gotoxy(10,15); printf("Issue any more(Y/N):"); fflush(stdin); another=getche(); fclose(fp); } break; } case '2':

//show issued book list

{ system("cls"); int j=4; printf("*******************************Issued book list*******************************\n");

50

gotoxy(2,2); printf("STUDENT NAME RETURN DATE");

CATEGORY

ID

BOOK NAME

ISSUED DATE

fs=fopen("Issue.dat","rb"); while(fread(&a,sizeof(a),1,fs)==1) { gotoxy(2,j); printf("%s",a.stname); gotoxy(18,j); printf("%s",a.cat); gotoxy(30,j); printf("%d",a.id); gotoxy(36,j); printf("%s",a.name); gotoxy(51,j); printf("%d-%d-%d",a.issued.dd,a.issued.mm,a.issued.yy ); gotoxy(65,j); printf("%d-%d-%d",a.duedate.dd,a.duedate.mm,a.duedate.yy); //struct dosdate_t d; //_dos_getdate(&d); gotoxy(50,25); //

printf("Current date=%d-%d-%d",d.day,d.month,d.year); j++; } fclose(fs); gotoxy(1,25); returnfunc(); } break; case '3':

//search issued books by id

{ system("cls"); gotoxy(10,6); printf("Enter Book ID:"); int p,c=0; char another='y'; while(another=='y') {

51

scanf("%d",&p); fs=fopen("Issue.dat","rb"); while(fread(&a,sizeof(a),1,fs)==1) { if(a.id==p) { issuerecord(); gotoxy(10,12); printf("Press any key......."); getch(); issuerecord(); c=1; } } fflush(stdin); fclose(fs); if(c==0) { gotoxy(10,8); printf("No Record Found"); } gotoxy(10,13); printf("Try Another Search?(Y/N)"); another=getch(); } } break; case '4':

//remove issued books from list

{ system("cls"); int b; FILE *fg;

//declaration of temporary file for delete

char another='y'; while(another=='y') { gotoxy(10,5); printf("Enter book id to remove:"); scanf("%d",&b); fs=fopen("Issue.dat","rb+");

52

while(fread(&a,sizeof(a),1,fs)==1) { if(a.id==b) { issuerecord(); findbook='t'; } if(findbook=='t') { gotoxy(10,12); printf("Do You Want to Remove it?(Y/N)"); if(getch()=='y') { fg=fopen("record.dat","wb+"); rewind(fs); while(fread(&a,sizeof(a),1,fs)==1) { if(a.id!=b) { fseek(fs,0,SEEK_CUR); fwrite(&a,sizeof(a),1,fg); } } fclose(fs); fclose(fg); remove("Issue.dat"); rename("record.dat","Issue.dat"); gotoxy(10,14); printf("The issued book is removed from list"); } } if(findbook!='t') { gotoxy(10,15); printf("No Record Found"); } } gotoxy(10,16); printf("Delete any more?(Y/N)");

53

another=getch(); } } default: gotoxy(10,18); printf("\aWrong Entry!!"); getch(); issuebooks(); break; } gotoxy(1,30); returnfunc(); } void viewbooks(void)

//show the list of book persists in library

{ int i=0,j; system("cls"); gotoxy(1,1); printf("*********************************Book List*****************************"); gotoxy(2,2); printf(" CATEGORY RackNo ");

ID

BOOK NAME

j=4; fp=fopen("Bibek.dat","rb"); while(fread(&a,sizeof(a),1,fp)==1) { gotoxy(3,j); printf("%s",a.cat); gotoxy(16,j); printf("%d",a.id); gotoxy(22,j); printf("%s",a.name); gotoxy(36,j); printf("%s",a.Author); gotoxy(50,j); printf("%d",a.quantity); gotoxy(57,j); printf("%.2f",a.Price); gotoxy(69,j); printf("%d",a.rackno);

54

AUTHOR

QTY

PRICE

printf("\n\n"); j++; i=i+a.quantity; } gotoxy(3,25); printf("Total Books =%d",i); fclose(fp); gotoxy(35,25); returnfunc(); } void editbooks(void)

//edit information about book

{ system("cls"); int c=0; int d,e; gotoxy(20,4); printf("****Edit Books Section****"); char another='y'; while(another=='y') { system("cls"); gotoxy(15,6); printf("Enter Book Id to be edited:"); scanf("%d",&d); fp=fopen("Bibek.dat","rb+"); while(fread(&a,sizeof(a),1,fp)==1) { if(checkid(d)==0) { gotoxy(15,7); printf("The book is availble"); gotoxy(15,8); printf("The Book ID:%d",a.id); gotoxy(15,9); printf("Enter new name:");scanf("%s",a.name); gotoxy(15,10); printf("Enter new Author:");scanf("%s",a.Author); gotoxy(15,11); printf("Enter new quantity:");scanf("%d",&a.quantity); gotoxy(15,12); printf("Enter new price:");scanf("%f",&a.Price);

55

gotoxy(15,13); printf("Enter new rackno:");scanf("%d",&a.rackno); gotoxy(15,14); printf("The record is modified"); fseek(fp,ftell(fp)-sizeof(a),0); fwrite(&a,sizeof(a),1,fp); fclose(fp); c=1; } if(c==0) { gotoxy(15,9); printf("No record found"); } } gotoxy(15,16); printf("Modify another Record?(Y/N)"); fflush(stdin); another=getch() ; } returnfunc(); } void returnfunc(void) { { printf(" Press ENTER to return to main menu"); } a: if(getch()==13) //allow only use of enter mainmenu(); else goto a; } int getdata() { int t; gotoxy(20,3); printf("Enter the Information Below"); gotoxy(20,4); printf("\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2"); printf("\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2");

56

gotoxy(20,5); printf("\xB2");gotoxy(46,5);printf("\xB2"); gotoxy(20,6); printf("\xB2");gotoxy(46,6);printf("\xB2"); gotoxy(20,7); printf("\xB2");gotoxy(46,7);printf("\xB2"); gotoxy(20,8); printf("\xB2");gotoxy(46,8);printf("\xB2"); gotoxy(20,9); printf("\xB2");gotoxy(46,9);printf("\xB2"); gotoxy(20,10); printf("\xB2");gotoxy(46,10);printf("\xB2"); gotoxy(20,11); printf("\xB2");gotoxy(46,11);printf("\xB2"); gotoxy(20,12); printf("\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2"); printf("\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2"); gotoxy(21,5); printf("Category:"); gotoxy(31,5); printf("%s",catagories[s-1]); gotoxy(21,6); printf("Book ID:\t"); gotoxy(30,6); scanf("%d",&t); if(checkid(t) == 0) { gotoxy(21,13); printf("\aThe book id already exists\a"); getch(); mainmenu(); return 0; } a.id=t; gotoxy(21,7); printf("Book Name:");gotoxy(33,7); scanf("%s",a.name); gotoxy(21,8); printf("Author:");gotoxy(30,8); scanf("%s",a.Author); gotoxy(21,9);

57

printf("Quantity:");gotoxy(31,9); scanf("%d",&a.quantity); gotoxy(21,10); printf("Price:");gotoxy(28,10); scanf("%f",&a.Price); gotoxy(21,11); printf("Rack No:");gotoxy(30,11); scanf("%d",&a.rackno); return 1; } int checkid(int t)

//check whether the book is exist in library or not

{ rewind(fp); while(fread(&a,sizeof(a),1,fp)==1) if(a.id==t) return 0;

//returns 0 if book exits

return 1; //return 1 if it not } int t(void) //for time { time_t t; time(&t); printf("Date and time:%s\n",ctime(&t));

return 0 ; }

void Password(void) //for password option { system("cls"); char d[25]="Password Protected"; char ch,pass[10]; int i=0,j; //textbackground(WHITE); //textcolor(RED); gotoxy(10,4); for(j=0;j<20;j++) {

58

delay(50); printf("*"); } for(j=0;j<20;j++) { delay(50); printf("%c",d[j]); } for(j=0;j<20;j++) { delay(50); printf("*"); } gotoxy(10,10); gotoxy(15,7); printf("Enter Password:"); while(ch!=13) { ch=getch(); if(ch!=13 && ch!=8){ putch('*'); pass[i] = ch; i++; } } pass[i] = '\0'; if(strcmp(pass,password)==0) { gotoxy(15,9); //textcolor(BLINK); printf("Password match"); gotoxy(17,10); printf("Press any key to countinue....."); getch(); mainmenu(); } else {

59

gotoxy(15,16); printf("\aWarning!! Incorrect Password"); getch(); Password(); } } void issuerecord()

//display issued book's information

{ system("cls"); gotoxy(10,8); printf("The Book has taken by Mr. %s",a.stname); gotoxy(10,9); printf("Issued Date:%d-%d-%d",a.issued.dd,a.issued.mm,a.issued.yy); gotoxy(10,10); printf("Returning Date:%d-%d%d",a.duedate.dd,a.duedate.mm,a.duedate.yy); } void loaderanim() { int loader; system("cls"); gotoxy(20,10); printf("LOADING........"); printf("\n\n"); gotoxy(22,11); for(loader=1;loader<20;loader++) { delay(100);printf("%c",219);} }

60

Output:

61

62

Related Documents


More Documents from ""