You are on page 1of 210

Enrolment no.

: 084627482

CHAPTER - 1 INTRODUCTION & OBJECTIVE


1.1 Introduction
This is the Project Report On School Management System. It provides us the information about student record, school faculty, school timetable, school fee, school examination result and library management. The system provide the flexibility of generating the required documents on screen as well as on printer as and when required. No organisation can function properly without a supply of data to give the essential information for decision-making. It is essential that the data and information should reach the people who need them quickly and in correct format. SMS capabilities include the basics such as transcripts, report cards, attendance, and discipline as well as many other specialized capabilities, including parental access to real time student grades on the Internet. This means that not only administrators but also parents, teachers, and students have access to realtime data. With traditional reporting methods parents may not find out how their student is performing in school until the end of the quarter or semester -- usually too late to correct a problem situation. SMS allows parents to know how their student is doing on a continual basis by using the internet. SMS can even send
1

Enrolment no.: 084627482


electronic progress reports to parents via email on a weekly, monthly, or even daily basis. The School Management System (SMS) will replace the paper-based data collection and information exchange system among the various departments of a particular school. Rather than use lots of different systems to manage this information, many schools use a School Management System (sometimes called a School Information System, or SIS). This is a system that manages all of a school's data in a single, integrated application. Having all of the information in a single system allows schools to more easily connect data together. School Management System (SMS) consists of tasks such as registering students, attendance record keeping to control absentees, producing report cards, producing official transcript, preparing timetable and producing different reports for teachers, parents and other stakeholders. The school management system automates most of day to day task and hence increases the productivity and performance of the administrative staff which leads to better valued image of the school before the parent sand society

1.2 Objectives

Enrolment no.: 084627482


The objectives of the proposed system would be to overcome the problems faced in the manual system. Updating records would not be a problem and also cross checking of records in the proposed system would not be required. General Objective The general objective of the project is to automate the SMS. The

objective of developing such a computerization system is to reduce the paper work and safe of time in school management. There by increasing the efficiency and decreasing the workload. Specific Objectives In order to attain the general objective, the following list of specific objectives is set: To develop an offline registration system. To facilitate attendance record keeping. To facilitate various report generation. To allow teachers, parents, school community and Education bureau officials to view reports on students. To produce a timetable. Purpose Of Sms

Enrolment no.: 084627482


The main purpose of School Management Systems (SMS) is to help schools manage various operations including student data, administrative, and fundraising operations. School management systems make the information flow quicker and more accessible. They provide teachers with useful tools to decrease the daily routine of simple tasks which could be automated. Parent interest usually is to have a better and quicker way to communicate with teachers of their children or the school administration. They get more involved as they can get up-to-date information about the school events, grades, children school attendance, homeworks etc. Teachers get automated reports and average grades in the end of a semester. Children have a list of the home tasks, digital learning materials. It saves a lot of time for the people involved in analyzing of the school performance as all statistics are presented automatically.

CHAPTER 2 TOOLS/ENVIRONMENTS & CATEGORY USED


2.1 Tools and Platform
4

Enrolment no.: 084627482


This project is developed using the tools, which are most suited for development of the Application Package.

These tools are as follows :


Tools : C++ System Requirements: Windows Platform Platform: Windows 2000, Windows XP , Windows Vista Internet Technologies : UML (Unified Modeling Language)

2.2 Hardware and Software Requirement Specification


HARDWARE Processor : Intel P4 CPU 1.6 GHz and above Memory : 256 MB RAM or more Hard Disk : 40 GB Moniter : preferably colour Printer SOFTWARE Operating System : Windows 95/98/NT/2000/XP Language : C++

Enrolment no.: 084627482

2.3 Project Category


This project as title School management system is comes under the Object Oriented Programming (OOPS). It uses object oriented technology to develop the system. This application can also be run on the network environment so it can be said as network application. This category include C++ language with Window XP operating system.

CHAPTER - 3 OBJECT ORIENTED PROGRAMMING PARADIGM


3.1 Object Oriented Programming (OOP)
A major challenge for software engineering today is to improve the software programming process as modern software life cycle has been changing very dramatically wherein the code re-usability, reliability and maintainability are
6

Enrolment no.: 084627482


the key features. The very aim of using an object oriented programming

language is to handle a complex software design in a very easy, simple and efficient manner. Redesigning and maintaining the source code costs much more than the reusability of the source code. The turnover time and software cost are drastically brought down. The main aim of designing the C++ language is to support both a procedure oriented style and an object oriented programming paradigm. In that sense, C++ is a hybrid language which support both the procedural as well as object oriented programming styles. Softwares designed using object oriented technology can meet up the challenges of large real systems by enhancing the ability to produce reliable and maintainable code. Through object oriented programming and design, such software can naturally evolve to meet changing needs. Object Oriented programming, or OOP, is a software development philosophy based on the following central ideas : Encapsulation Inheritance Information hiding Data abstraction and Polymorphism

Enrolment no.: 084627482


Object is the basic unit of object oriented programming. Designing an object-oriented model involves defining a set of classes. A class is a template from which objects are created. The template, provided by the class specifies a set of data and methods that all objects created according to its specification will contain. Hence, the object oriented programming approach has the advantage of producing more reliable softwares for complex and large-scale systems.

3.2 Features Of OOP


Some striking features of object oriented programming are : Emphasis is on data rather than procedure. Programs are divided into objects.
Data Structures are designed, such that they characterize the objects.

Functions that operate in the data of object are tied together in the data structure . Data is hidden and cannot accessed by external functions. Objects may communicate with each other through functions.
8

Enrolment no.: 084627482


New data and functions can be easily added whenever necessary. Follows bottom up approach in program design.

Object Oriented Programming provides major advantages in the creation and maintenance of software. These include shorter development time and a high degree of code sharing and flexibility. These advantages make object oriented programming an important technology for building complex software system now and in the future.

3.3 Introduction to C++


C++ is an object-oriented programming (OOP) language that is viewed by many as the best language for creating large-scale applications. C++ is not only derived from C but also a superset of the C language. C++ is the multi paradigm, compile, free form , general purpose, statistically typed programming language. This is known as middle level language as it comprises of low level and high level language features. OOP and design is all about objects. An object has both state (data) and behaviour (operation of data). Object are the fundamental building blocks for designing a software. Object is the basic unit of OOP. Designing an object9

Enrolment no.: 084627482


oriented model involves defining a set of classes. A class is a template from which objects are created. Once a class is defined , any number of objects of that class are easily created. A class is thus a collection of objects of similar type. Features Of C++ The main features of the C++ are :

Classes Inheritance Data abstraction and encapsulation Polymorphism Dynamic Binding Message Passing

Classes: By using classes we can create user defined data types. In other words the class is the collection of set of data and code. The class allows us to do some things which are polymorphism, inheritance, abstraction, encapsulation which are our next features. The objects are the instances of classes. The syntax for class is : Class <class-name> {

10

Enrolment no.: 084627482


//Body of class; }; Inheritance: Inheritance allows one data type to acquire properties of other data types. Inheritance from a base class may be declared as public, protected, or private. If the access specifier is omitted, a class inherits privately, while a struct inherits publicly. This provides the idea of reusability that means we can add the new features to an existing class without modifying it. Data Abstraction and Encapsulation: Encapsulation means hiding of data from the data structures or in other words wrapping up of data in single entity is known as Encapsulation. In this the data is not accessible to outside world and only the functions are allowed to access it. When we want to write the class in which we dont have the knowledge about the arguments used to instantiate it then we can use templates in C++. Abstraction can be defined as the act of representing essential features without including background details. Polymorphism: it means that the one interface can be used for many implementation so that object can behave differently for each implementation. The different types of polymorphism are static (Compile time) and dynamic (Run time). Dynamic Binding: It means that the linking of a procedure call to code to be executed in response to the call. A function call associated with a polymorphic

11

Enrolment no.: 084627482


reference depends on the dynamic type that reference. And at run-time the code matching the object under current reference will be called. Message Passing: An object oriented program consists of the set of objects that communicate with each other. objects communicate with one another by sending and receiving information much the same way as people pass messages to one another. The concept of message passing makes it easier to direct model or simulate their real world counterparts.

3.4 Unified Modeling Language


Unified Modeling Language (UML) is a standardized general-purpose modeling language in the field of Object-Oriented software engineering. The Unified Modeling Language (UML) is a language for specifying, visualizing, constructing and documenting the artifacts of software systems, as well as for business modeling and other non-software systems. The UML represents a collection of best engineering practices that have proven successful in the modeling of large and complex systems. The UML defines various types of Diagrams. They are Class diagram, Object diagram, Use Case diagram, Sequence diagram, Collaboration diagram, Statechart diagram, Activity diagram, Component diagram and Deployment diagrams.
12

Enrolment no.: 084627482

CHAPTER -4 FEATURES AND ADVANTAGES OF SYSTEM


4.1 Features of School Management System 5.1 Features of School

Management System Automation of School Office Administration. Connects all Education Stakeholders Administrator, Teachers, Students and Parents. Student information management system with SMS integration for sending various SMS alerts. Fully fledged Library Management System. Fees Management Printing fee receipts, generating reports, sms parents for fees dues. Time Table Management. Student feedback system (Feedback of the students about the subject, teaching, etc). Attendance Management. Student Attendance. Staff Attendance. Customized Report Generation . Staff / Student ID card Management System. Preparation of Annual Confidential Report. Exam result, student performance, fees due dates to parents.
13

Enrolment no.: 084627482

4.2 Advantages of the System 1. Manual effort is reduced and speedy and accurate reports are generated. 2. Data security is maintained on a departmental level. 3. High degree of security and safety according to international standards. 4. High degree of transparency of the institution through the Web. 5. Better co-ordination between departments. 6. Student conveniences extended beyond the classroom. 7. Overall reduction of operating costs; and savings on time and efforts. 8. Easy to learn, use and implement. 9. A good marketing tool.
10.

Highly streamlined and effective workflow of administration and academia.

11. Workload on entire staff, administration, clerical and teaching is heavily

reduced.
12.

Over time a knowledge base will be built-up which will be extremely useful for the management in future.

14

Enrolment no.: 084627482


13. Does a total re-engineering of the administrative mechanism. 14. Ensures greater efficiency. 15. Integration of administrative functions. 16. Better quality of service. 17. User level access rights are implemented so that users without sufficient

rights will not be able to access the system, thereby increasing the security.
18. Single Point School Management Software. 19. Zero redundancy in managing the entire institutions records. 20.

Complete online and offline functionality leaving nothing unturned to bring it as an effective management system.

21. Achieve global outlook and exposure for the institute and its constituents. 22. Save man hrs and money in lots of communication aspects. 23. Save man hrs in managing information with automation. 24. Get connected to parents and alumni in an effective manner. 25. Single software handing everything saves a lots of investment in different

software and management issues.


26. Things like HTML enhanced e-mail system on institutes web site act as an

effective brand building tool.


15

Enrolment no.: 084627482


27. Better informed decision making for management. 28. Total Cost-Control (expenditure and income). 29. All departments are linked through the central database. 30. Inter-departmental paper based transactions become a thing of the past. 31. Parents have access to all academic information about their wards through

the internet. 4.2.1 Advantage for Students 1. Students can view all there results through internet as soon as it is

announced. 2. They can get the intimation about special events like sports, Holiday,

cultural events & excursion as soon as it is announced. 3. All the queries regarding certificates, Marks Card can be given

through mail and a copy will be sent to him instantly through internet.

4.2.2 Advantage for Parents 1. The parent will get to know about there child's absence to the class with in 10 minutes from the time of commencement of the class.

16

Enrolment no.: 084627482


2. Parents will regularly get the details about Parents Meeting, Results, Cultural function, fee, excursion & special events as soon as it is announced. 3. An SMS will be sent to the parents when the results are announced. 4. If parents require any detailed information about there child, they can place a request through mobile or mail and will be sent to them within 12 hours. 5. Every parent is given a login id so that they can view there child's result and overall performance.

CHAPTER 5 SYSTEM ANALYSIS


System Analysis
The goal of system analysis is to determine where the problem is in an attempt to fix the system. This step involves breaking down the system in different pieces to analyze the situation, analyzing project goals, breaking down what needs

17

Enrolment no.: 084627482


to be created and attempting to engage users so that definite requirements can be defined.

5.1 Functional Requirements


The functional requirements of the system are: register a student, record attendance of students, generate various reports, generate timetable.

5.2 Non Functional Requirements


Security requirements are important factors in this system as classified data will be stored in the database. User validation will be done during login to insure that the user is valid and that the user only has access to his or her permission data. General users will only have access through the user interface. The system will be easily maintained by the developer or other authorized trained person and it shall respond as fast as possible in generating report and producing the timetable.

5.3 Software Requirement Specification (SRS)


Proper planning and complete understanding of software requirement is essential for the success of a software development effort. No matter how well
18

Enrolment no.: 084627482


designed or well coded, a poorly analysed and specified program well disappoint the user and bring grief to the developer. Thus , analysis of the program is the first in the software development. The analysis task is the process of discovery, refinement , modeling and specification. It enables the system engineer to specify function and performance, indicate softwares interface with other system elements and establish constraints that the software must meet. It allow the analyst to refine the software allocation and build models of data, functions and behavioral domains that will be treated by the software. This phase provides the software designer with models that can be translated in to data, architectural, interface and procedural design. Finally, it provides the developer and the customer with the means to access quality of the software once it is built. In analysis phase we IDENTIFY THE NEEDS of the School by enquiring and meeting staff and management

personnel this helps us to know how the existing system is functioning and what difficulties they are facing with the present system. The overall performance is gathered by conducting the interviews, filling the questionnaires and by review of manuals.

1. Introduction 1.1) Purpose :

19

Enrolment no.: 084627482


The purpose of this section of report is to describe the system requirements imposed on School Management System. Developer will use it for the software Design and Construction and testing for verification of the product during the Software Testing Phase shall use it. The parents of students are very busy now days, so they cant monitoring their children and their activities properly and regularly.This school management system helps the parents monitor their children from anywhere. They can check their children's academic performance from a remote location.

1.2 Scope :
On the basis of the initial investigation the solution approach was adopted and the working strategy in the form of SRS ( software requirement specification ) was submitted to the training in charge. After thoroughly studying our solution appproach the SRS was approved. The working strategy followed is Linear/Waterfall model which is based on linear approach wheare the design processes is dividing into three stsges, starting from analysis where feasibility is studied to designing of the process then to its implementation and finally the testing stage where the software is tested to find and remove bugs in any. The scope of this section of report shall remain thoughout the life cycle of the software. Any change in the requirement leads to change in the subsequent phases of the life cycle. School Management System is comprehensive web-based School
20

Enrolment no.: 084627482


Management Software. It will design for better interaction between students, teachers, parents & management.

2. General Description : 2.1 Product Function Summary :


The Characteristics of School Management System are as follows : This application is intended to only Parents of the student. Every parent of student gets the Login Id & password at the time of addmission of the student in the school. Parents can Check their childs performance, also they can check attendence of their child in the school. Parents are able to see progress and Result of their child. Parents can see fee structure, Syllabus & homework or assignments & tutorials given to student. 2.2 User Characteristics : Students : They are the people who studying in the school. Parent : They are the guardians of the student. Teacher : They are persons who teach a different subject. Admin/Principal :They are the person who handle all over management of the school. 2.3 General Constraints :
21

Enrolment no.: 084627482


2.3.1 Interface Constraints : Since, this is a Web based application so it should work on major browsers like Internet explorer, Mozilla Firefox, Google Chrome, Opera etc. 2.3.2 Safety and Security Constraints : Since, application is intended for the authenticated users only, so anonymous person should not be able to access and operate over the user data. 3. External Interface Requirements : 3.1 User Interface : Since this is a Web based application so it should provide a very User friendly interface. It should be easy to navigate without any learn curve involved. A decent and pleasant appearance with ease of navigation should helps to users. 3.2 Software Interface : The communication between client and server is asynchronous. This will help to handle a large amount of users simultaneously. The portal should support all major web browsers that will make it convenient for the user to access our system with ease. 3.3 Hardware Interface: The hardware requirement at the user end is really simple and the Portal will be available on the hardware that can run a basic simple browser, provided the hardware should be competent enough during peak times for the web servers.

22

Enrolment no.: 084627482 4. Non Functional Requirements


4.1 Performance Requirements : The portal should be able to operate on all major web-browsers with all of its fundamental functions . It should not slow-down the system even at peak hours without affecting the quality of service of the system. 4.2 Security Requirements : The system should provide a secure login to the users by using advanced secure login algorithms and provide access only to the authorized users as security is the key requirement of this system. 4.3 Software Quality Attributes : System should be

Consistent in performance Safe and Secure

Robust Scalable

Flexible Efficient Upgradable Available all the time.

User friendly

Inter-operable

23

Enrolment no.: 084627482

5.4 DATA FLOW DIAGRAM (DFDS)

Figure 5.1 : DFD of School Registration System

24

Enrolment no.: 084627482

Figure 5.2 : DFD Of School Management

25

Enrolment no.: 084627482

Figure 5.3: Student Information System is as follows.

5.5 Analysis Model

26

Enrolment no.: 084627482


To produce a model of the system which is correct, complete and consistent we need to construct the analysis model which focuses on structuring and formalizing the requirements of the system. Analysis model contains three models: functional, object and dynamic models. The functional model can be described by use case diagrams. Class diagrams describe the object model. Dynamic model can also be described in terms of sequence, state chart and activity diagrams. For the purpose of this project we have described the analysis model in terms of the functional model and dynamic models using use case and sequence diagrams.

27

Enrolment no.: 084627482

Figure 5.4 : Use Case Diagram of School Administration and management

5.4.1 Use case Diagram


28

Enrolment no.: 084627482


Actors There are six types of actors in the system namely administrator, teacher, assistant, chairman, secretary/student affair, chairman, and student. The actors have access via the online interface of the system which requires authorization. Use Cases The Use Case diagram for the system is shown in Figure 5.5. As can be seen from the diagram each actor has access to different Use Case, but some of them overlap. The administrator is able to manage such resources as faculty, department, room, hour, authorities, calendar, semester, and person. It means that Administrator can add modify and delete information related to those resources. The teacher able to view information about course, attendance, exam, grade, and schedule of course he is giving. Also he is able to update attendance, grade, and syllabus of the course he is giving and, create new exams. The student is able to view information about course, attendance, exam, grade, and schedule of course he is taking.. Chairman is able to view information about course, attendance, exam results, grades, student details, teacher evaluation results, and curriculum of his department. Also he is able to update course, schedule and curriculum of his department. In

29

Enrolment no.: 084627482


addition he can open new course and approve students add/drop and add courses to list courses student selected. . of

30

Enrolment no.: 084627482

Use cases of the system are identified to be ,RecordAttendance, GenerateTranscript, GenerateReportCard, ViewReport and

31

Enrolment no.: 084627482


ProduceTimetable.

32

Enrolment no.: 084627482

Figure 5.6 : Use Case Diagram of the SMS

33

Enrolment no.: 084627482

Figure 6.9 : Analysis Of SMS

Figure 5.7 : Analysis Of SMS

5.3.2 Class Diagram The class diagram is a static diagram. It represents the static view of an application. Class diagram is not only used for visualizing, describing and documenting different aspects of a system but also for constructing executable code of the software application.

34

Enrolment no.: 084627482


The class diagram shows a collection of classes, interfaces, associations, collaborations and constraints. It is also known as a structural diagram. The purpose of the class diagram is to model the static view of an application. The class diagrams are the only diagrams which can be directly mapped with object oriented languages and thus widely used at the time of construction.

35

Enrolment no.: 084627482

Figure 5.8 : Class diagram of SMS

5.3.4 Sequence Diagram Sequence diagrams show the interaction between participating objects in a given use case. They are helpful to identify the missing objects that are not

36

Enrolment no.: 084627482


identified in the analysis object model. To see the interaction between objects, the following describe the sequence diagram of each identified use cases. In Figure 5.9 below, once the user has activated the registration module by interacting with the boundary object NewRegisterationButton button, the control object named RegistrationControl manages the activities involved in registerStudent use case. First the RegistrationControl creates registration form which will be filled by the secretary and submitted. The registration control sends the record to a persistent storage. The sequence diagrams for RecordAttendance, GenerateTranscript, ViewReport and GenerateTimetable use cases are shown in figures 5.10, 5.11, 5.12 and 5.13 respectively.

37

Enrolment no.: 084627482

Figure 5 .9 : Sequence diagram for Student Registration

38

Enrolment no.: 084627482

39

Enrolment no.: 084627482

Figure 5.10 : Sequence diagram for Recording Attendance

40

Enrolment no.: 084627482

Figure 5.11 : Sequence Diagram for Transcript Generation

41

Enrolment no.: 084627482

42

Enrolment no.: 084627482

Figure 5.12 : Sequence Diagram for viewing student status by the parents

43

Enrolment no.: 084627482

Figure 5.13 : Sequence Diagram for generating Timetable

CHAPTER 6
44

Enrolment no.: 084627482

SYSTEM DESIGN
System Design
Based on the user requirements and the detailed analysis of the existing system, the new system must be designed. This is the phase of system designing. It is the most crucial phase in the developments of a system. The logical system design arrived at as a result of systems analysis is converted into physical system design. Normally, the design proceeds in two stages: 1. Preliminary or General Design 2. Structured or Detailed Design 1. Preliminary or General Design: In the preliminary or general design, the features of the new system are specified. The costs of implementing these features and the benefits to be derived are estimated. If the project is still considered to be feasible, we move to the detailed design stage. 2. Structured or Detailed Design: In the detailed design stage, computer oriented work begins in earnest. At this stage, the design of the system becomes more structured. Structure design is a blue print of a computer system solution to a given problem having the same components and inter-relationships among the same components as the original problem. Input, output, databases, forms, codification schemes and processing
45

Enrolment no.: 084627482


specifications are drawn up in detail. In the design stage, the programming language and the hardware and software platform in which the new system will run are also decided.

6.1 Design Goals


Design goals describe the qualities of the system that developers should optimize. Such goals are normally derived from the non-functional requirements of the system. Design goals are grouped into five categories. These are : Performance Dependability Maintenance End User Criteria 3. Performance Criteria The part of the system to be used for the record office should have a fast response time (real time) with maximum throughput. Furthermore, the system should not be taking up too much space in memory. The record officer has chosen fast response time over throughput and hence the system should try to be more interactive. In the case of the timetabling subsystem, the system should be more reliable in order to satisfy the constraints than fast response time.

46

Enrolment no.: 084627482


4. Dependability The school needs the system to be highly dependable as it is expected to be used by non-IT professionals. The system should be robust and fault tolerant. Furthermore, as the system is handling sensitive data of the school, high emphasis should be given with regards to security, as there are subsystems to be accessed through web. 5. Maintenance The system should be easily extensible to add new functionalities at a later stage. It should also be easily modifiable to make changes to the features and functionalities. 6. End User Criteria Usability: Usability is the extent to which a product can be used by specified users to achieve specified goals with effectiveness, efficiency and satisfaction in a specified context of use. From the end users perspective the system should be designed in such a way that it is easy to learn and use, efficient and having few errors if any. Trade-off is inevitable in trying to achieve a particular design goal. One best case is the issue of security versus response time. Checking User-Id and Password before a member can enter to the SMS creates response time problem/overhead. The other case is the issue of response time versus quality.
47

Enrolment no.: 084627482


There is some amount of time taken by the system to generate the timetable. So the user has to wait a little after telling the system to generate the timetable and getting the result to get a quality timetable.

6. 2 DATABASE DESIGN ( TABLES USED )


1. STUDENT

SNO. 1

FIELD NAME S_ID


48

DESCRIPTION Student ID

Enrolment no.: 084627482


2 3 4 5 6 7 8 S_NAME F_NAME REG_NO ROLL_NO DOB PHONE ADDRESS Student Student Student Student Student Student Student Name Father Name Registration Number Roll Number Date Of Birth Phone Number Address

2. ATTENDANCE S.NO 1 2 3 4 FIELD NAME STUDENT_ID STATUS REMARKS ATTEN_DATE DESCRIPTION Student Id Status Of Student Remarks Of Student Date Of Attendance

3. STAFF

49

Enrolment no.: 084627482

4. LIBRARY SNO. 1 S.NO 2 1 3 2 4 5 3 6 4 7 8 9 10 FIELD NAME EMP_ID FIELD NAME EMP_NAME BOOK_ID ADDRESS BOOK_TITLE MOBILE EMAIL BOOK_AUTHOR M_STATUS ISSUE_TO DOB DEPT NATURE _OF_JOB BASIC_PAY DESCRIPTION Employee ID DESCRIPTION Employee Name C ode Of Book Employee Address Title Of Mobile Employee Book Number Employee Email ID Author Of Book Employee Martial Status Book Is Date To Student Employee IssuedOf Birth Employee Department Name Employee Job Employee Basic Pay

5. FEE

SNO. 1 2 3 4 5 6 6. EXAM
S.NO 1

FIELD NAME REG_NO ROLLNO S_CLASS FEE_DEP DEP_DATE FINE

DESCRIPTION Student Registration Number Student Roll Number Student Class Fee Deposit By Student Date Of Deposition Fine Paid By Student

FIELD NAME S_ID

DESCRIPTION Student ID

50

Enrolment no.: 084627482


2 3 4 5 6 S_NAME S_CLASS H_T_ISSUE CENTRE_CODE E_CENTRE Student Name Student Class Hall Ticket Issued To Student Exam Centre Code Exam Centre Code

7. RESULT
SNO 1 2 3 4 5 FIELD NAME REG_NO SUBJECT_NAME MAX_MARKS PASS_MARKS MARKS_OBT DESCRIPTION Student Registration Number Subject Name Of Student Maximum Marks Obtained Maximum Pass Marks Marks Obtained By Student

51

Enrolment no.: 084627482

CHAPTER - 7 SYSTEM DEVELOPMENT LIFE CYCLE


System Development Life Cycle

Systems Development Life Cycle (SDLC) is a process used by a systems analyst to develop an information system, including requirements, validation, training, and user (stakeholder) ownership. Any SDLC should result in a high quality system that meets or exceeds customer expectations, reaches completion within time and cost estimates, works effectively and efficiently in the current and planned Information Technology infrastructure, and is inexpensive to maintain and cost-effective to enhance. The System Development Life Cycle (SDLC) is a conceptual model used in project management that describes the stages involved in an information system
52

Enrolment no.: 084627482


development project from an initial feasibility study through maintenance of the completed application. Various SDLC methodologies have been developed to guide the processes involved including the waterfall model (the original SDLC method), rapid application development (RAD), joint application development (JAD), the fountain model and the spiral model. Mostly, several models are combined into some sort of hybrid methodology. Documentation is crucial regardless of the type of model chosen or devised for any application, and is usually done in parallel with the development process. Some methods work better for specific types of projects, but in the final analysis, the most important factor for the success of a project may be how closely particular plan was followed. System life cycle is an organizational process of developing and maintaining systems. It helps in establishing a system project plan, because it gives overall list of processes and sub-processes required for developing a system. System development life cycle means combination of various activities. In other words we can say that various activities put together are referred as system development life cycle. In the System Analysis and Design terminology, the system development life cycle also means software development life cycle.

53

Enrolment no.: 084627482

Figure 7.1 : System Development Life Cycle

Following are the different phases of system development life cycle: 1. Preliminary study 2. Feasibility study 3. Detailed system study
54

Enrolment no.: 084627482


4. System analysis
5. System design

6. Coding 7. Testing 8. Implementation 9. Maintenance The image below is the classic Waterfall model methodology, which is the first SDLC method and it describes the various phases involved in

55

Enrolment no.: 084627482


development.

56

Enrolment no.: 084627482 Different Phases of Software Development Life Cycle are:
7.1 Preliminary System Study Preliminary system study is the first stage of system development life cycle. This is a brief investigation of the system under consideration and gives a clear picture of what actually the physical system is? In practice, the initial system study involves the preparation of a System Proposal which lists the Problem Definition, Objectives of the Study, Terms of reference for Study, Constraints, Expected benefits of the new system, etc. in the light of the user requirements. The system proposal is prepared by the System Analyst (who studies the system) and places it before the user management. The management may accept the proposal and the cycle proceeds to the next stage. The management may also reject the proposal or request some modifications in the proposal. In summary, we would say that system study phase passes through the following steps: problem identification and project initiation background analysis inference or findings (system proposal)

7.2 Feasibility
57

Enrolment no.: 084627482


In case the system proposal is acceptable to the management, the next phase is to examine the feasibility of the system. The feasibility study is used to determine if the project should get the go-ahead. If the project is to proceed, the feasibility study will produce a project plan and budget estimates for the future stages of development. 7.3 Requirement Analysis and Design Analysis gathers the requirements for the system. This stage includes a detailed study of the business needs of the organization. Options for changing the business process may be considered. Design focuses on high level design like, what programs are needed and how are they going to interact, low-level design (how the individual programs are going to work), interface design (what are the interfaces going to look like) and data design (what data will be required). During these phases, the software's overall structure is defined. Analysis and Design are very crucial in the whole development cycle. Any glitch in the design phase could be very expensive to solve in the later stage of the software development. Much care is taken during this phase. The logical system of the product is developed in this phase. 7.4 Implementation

58

Enrolment no.: 084627482


In this phase the designs are translated into code. Computer programs are written using a conventional programming language or an application generator. Programming tools like Compilers, Interpreters, Debuggers are used to generate the code. With respect to the type of application, the right programming language is chosen. 7.5 Coding The system design needs to be implemented to make it a workable system. This demands the coding of design into computer understandable language, i.e., programming language. This is also called the programming phase in which the programmer converts the program specifications into computer instructions, which we refer to as programs. It is an important stage where the defined procedures are transformed into control specifications by the help of a computer language. The programs coordinate the data movements and control the entire process in a system. It is generally felt that the programs must be modular in nature. This helps in fast development, maintenance and future changes, ifrequired.

7.6 Testing

59

Enrolment no.: 084627482


In this phase the system is tested. Normally programs are written as a series of individual modules, these subject to separate and detailed test. The system is then tested as a whole. The separate modules are brought together and tested as a complete system. The system is tested to ensure that interfaces between modules work (integration testing), the system works on the intended platform and with the expected volume of data (volume testing) and that the system does what the user requires (acceptance/beta testing). 7.7 Maintenance Inevitably the system will need maintenance. Software will definitely undergo change once it is delivered to the customer. There are many reasons for the change. Change could happen because of some some unexpected input values into the system. In addition, the changes in the system could directly affect the software operations. The software should be developed to accommodate changes that could happen during the post implementation period.

CHAPTER 8 MODULES AND REPORTS

60

Enrolment no.: 084627482


8.1 MODULES

The School Management System consists of many modules. Each module can be accessed by a restricted group of users. Modules of School Management System are : ADMISSION The module manages the registration and admission process of both new and the old students. Fully integrated with the accounts section, this module allows admission and registration manageable and removes complications arising from human errors. Old and new students are automatically treated differently based on the pre provided information. STUDENT RECORDS The Student Records Management module enables effective management of comprehensive records on each student such as student personal particulars along with Photograph, attendance, co-curriculum activities, achievement, discipline, previous school information, school leaving information and parent/guardian. The system will eliminate duplicate effort on numerous manual processes and paperwork. ATTENDENCE Attendance section plays different roles for Students and Employees. Students

61

Enrolment no.: 084627482


attendance details act as a tool to identify irregularities in the academic interests of the students. The same can be used to assess the student and give individual attention to the causes of repetitive or long absences. The Attendance module is responsible for storing and representing of information related with students attendance for each course. This module can be accessed by all users accept administrators. Student can view own attendance, whether other users can view and modify the information stored by module

FEE MANAGEMENT The Fee Module of is the one of the most automated fee calculation module available in the market. Apart from being automated it is, at the same time, flexible enough to accommodate the varying nature of fee payments that most of the institutions come across. Fee calculation is done on the basis of Category selected for the student. The module automatically calculates the pending fees, previous fee payment details, deductions and concessions if any applicable to the selected student. In addition to the above, the user is also provided the option to allow payment of more than one month/fee-cycle fee whichever applicable. The module enables effective management of Fee records of each student. User-defined fee structure and category can be maintained. Automated bill generation option enhances the system dependability. Fee Receipt can be accepted by the system with few mouse clicks. At any point of time user can

62

Enrolment no.: 084627482


check collections made and outstanding with single click. REPORT CARD / AUTOMATED EXAMINATION REPORT CARD GENERATION The Grade module is responsible for representing and storing of records related with students grades taken from exams. The module can be accessed by teachers and students. The permissions for this module are the same as for Exam module. LIBRARY The Library module enables effective management of School Library. With a single click books can be allotted and you can keep check on limits like No of books to be issued, Value of books that can be issued to Students/Staff. It allows various features like reservation of books, books searching, obsolete / spoil books, Library members report, fine collection report, Daily issue register, Accession Register with various conditions STAFF RECORDS The Staff Records Management module allows user to store academic and nonacademic staff info such as personal details, pay band details, grade pay details, USER ACCESS With robust and flexible security features, user access to each of the modules is based on the user role (s) as defined in the system. In addition, functions that
63

Enrolment no.: 084627482


could be performed by each user role can be easily defined. An appointed System Administrator maintains an audit log that shows records of all access to your database in the system for viewing. SYSTEM ADMINISTRATION This module will enable the System Administrator to perform system and database backup/restore functions. The System Administrator may view the Audit Log, which records all users access to the database. An event log that captures unsuccessful or unauthorized logon to the system is also available. STUDENT & STAF ID CARD The system allows you to print students and staff ID cards. Information such as student name, student number and class that are automatically extracted from the student records will be printed on the student ID card. Whereas for staff, the staff name, staff number and job title/grade can be printed on staff ID card. REPORTS The Report Module is the vital module of School Management System which generates numerous reports that includes fee details, administration, library, student details, employees details and many more. Data navigates through all modules and the desired reports can be generated by a button click.

64

Enrolment no.: 084627482


8.2 Reports

The Report Module includes the following reports :

Student Details: The student report displays the report regarding students. This section has the following reports:
o o o o o o

Admission Wise Age Wise Gender Wise Class Wise Complete Student Details Roll Number Wise

Class Details: The class details reports displays the report regarding class details. This section includes the following reports:
o o o

Class Charges Class Subject Examination Scheduling

Administration Report: The administration report displays the reports regarding institution administration. This section has the following reports:
65

Enrolment no.: 084627482


o o

Donation Occurrence

Library Details: The library report displays the reports regarding institution's library. This section has the following reports:
o o o o o

Books in Library Issued Books Overdue Books Fine Details Stock Details

Fee Details Report: The fee details report displays the reports regarding fee. This section of report includes the following reports.
o o o o

Admission Fee Receipt Monthly Fee Receipt Fee Due Fee Collection Report
o

Fee Report

Employee Details: The transportation report displays the institution's transportation details. This section includes the following reports:
66

Enrolment no.: 084627482


o o o

Personal Details Department/ Designation wise Details Teacher Subject

Time Table Report The time table report displays the reports regarding time table. This section includes the following reports:
o o

Class Time Table Teacher Time Table

Mark Sheet Report: The mark sheet report displays the report regarding class wise mark sheet. This section includes the following reports:
o o o o o

Single Student Class Wise Consolidated Sheet Class Wise Subject Topper Student Card

Attendance Report: The attendance report displays the attendance report for students as well employees. This section includes the following reports:
o

Student Attendance Details

67

Enrolment no.: 084627482


o

Employee Attendance Details

CHAPTER - 9 CODING
/* SCHOOL MANAGEMENT SYSTEM */ #include<iostream.h> #include<graphics.h> #include <stdlib.h>

68

Enrolment no.: 084627482


#include<process.h> #include<iomanip.h> #include<fstream.h> #include<string.h> #include<stdlib.h> #include<conio.h> #include<stdio.h> #include<ctype.h> #include<math.h> #include<bios.h> #include<dos.h> #include<dir.h> struct marks_criteria { int sc_min,com_min,arts_min, seat_sc, seat_com, seat_arts; }crit; class School_Management_System { public: void Admission_Management(); void Student_Management(); void Staff_Management(); void Library_Management(); void Fees_Management(); void Examination_Management(); void Report_Card_Management(); void menu(); }; class student1 { private: char name[20]; int regno,m_eng,m_math,m_sc,m_sst,m_lang; int pref_code, stream; public: void new_file(); void input_data(); void allot_stream(); int get_stream(); 69

Enrolment no.: 084627482


void display(); int show_per() { return((m_eng+m_math+m_sc+m_sst+m_lang)/5); } };

void clear(); void input_criteria(); void read_criteria(); void read_student1(); void create_eligible_sc(); void create_eligible_com(); void create_eligible_arts(); void read_eligible_sc(); void read_eligible_com(); void read_eligible_arts(); char * stream_name(int strm); void select_list( char *in_file, char *out_file); student1 s; void School_Management_System::Admission_Management() { clrscr(); fstream fin, fout; fstream fsc, fcom, farts; int opt=1, ch; while(opt!=8) { clrscr(); clear(); cout<<"\n\t=========== MENU OF ADMISSION MANAGEMENT ==========\n"; cout<<"\n\t[1] CREATE ADMISSION CRITERIA"; cout<<"\n\n\t[2] ENTER STUDENT'S DATA "; cout<<"\n\n\t[3] ALLOTMENT OF STREAM"; cout<<"\n\n\t[4] DISPLAY CRITERIA FOR SELECTION"; cout<<"\n\n\t[5] DISPLAY ALLOTMENT OF STUDENT'S STREAM"; cout<<"\n\n\t[6] DISPLAY ALL STUDENT'S REGISTERED"; cout<<"\n\n\t[7] CREATE / DISPLAY MERIT LIST"; cout<<"\n\n\t[8] BACK TO MAIN MENU";

70

Enrolment no.: 084627482


cout<<"\n\t======================================= =============\n"; cout<<"\n\n\t\tEnter your choice : "; cin>>opt; switch(opt) { case 1: input_criteria(); break; case 2: int option; clrscr(); cout<<"\n What do u want --\n\n\n\n\n\tCreate a new student information file or Append to the existing file?\n\n\t(press 1 for new creation and 2 for appending)\n \n \n" ; cin>>option; if(option==1) { s.new_file(); } else { s.input_data(); } break; case 3: clrscr(); read_student1(); fin.open("student1" ,ios::in|ios::out); fsc.open("elig_sc",ios::out); fcom.open("eligcom",ios::out); farts.open("eligart",ios::out); while(fin.read((char*)& s,sizeof(s))) { s.allot_stream(); s.get_stream(); if(s.get_stream()==1) fsc.write((char*)& s,sizeof(s)); if(s.get_stream()==2) fcom.write((char*)& s,sizeof(s)); if(s.get_stream()==3) farts.write((char*)& s,sizeof(s)); 71

Enrolment no.: 084627482


} fin.close(); fsc.close(); fcom.close(); farts.close(); cout<<"\n\n\tSTREAM ALLOCATION DONE."; break; 4: read_criteria(); clear(); cout<<"\n Sc : "<<crit.sc_min; cout<<"\n Com : "<<crit.com_min; cout<<"\n Sc : "<<crit.arts_min; break; 5: cout<<"\n Enter 1 for Sc, 2 for Com, 3 for Arts : "; cin>>ch; if (ch==1) read_eligible_sc(); if (ch==2) read_eligible_com(); if (ch==3) read_eligible_arts(); break; 6: clrscr() ; read_student1(); break; 7: char c; int k=1; cout<<"\n****************************************"; cout<<"\n M E R I T L I S T"; cout<<"\n =================="; cout<<"\n\tEnter 1 for MERIT LIST SCIENCE "; cout<<"\n\tEnter 2 for MERIT LIST COMMERCE "; cout<<"\n\tEnter 3 for MERIT LIST ARTS \t"; cout<<"\n****************************************"; cin>>k; if (k==1) { select_list("elig_sc","sell_sc"); 72

case

case

case

case

Enrolment no.: 084627482


fin.open("sell_sc",ios::in); } if (k==2) { select_list("eligcom","sellcom"); fin.open("sellcom",ios::in); } if (k==3) { select_list("eligart","sellart"); fin.open("sellart",ios::in); } if(k>=1 && k<=3) { while(fin.read((char*)& s,sizeof(s))) { s.display(); cout<<"\n\t Continue (y/n)?"; cin>>c; if(c=='n') break; } } fin.close(); fin.close(); fin.close(); break; case 8: break; } } } // END OF WHILE void student1::allot_stream() { int per=(m_eng+m_math+m_sc+m_sst+m_lang)/5; read_criteria(); switch(pref_code) { case 1: if(per>=crit.sc_min) stream=pref_code; 73

Enrolment no.: 084627482


else stream=0; break; case 2: if(per>=crit.com_min) stream=pref_code; else stream=0; break; case 3: if(per>=crit.arts_min) stream=pref_code; else stream=0; break; } } int student1::get_stream() { return(stream); } void input_criteria() { fstream fout; fout.open("criteria" ,ios::in|ios::out); cout<<"\n Enter the required marks for SCIENCE stream(in percentage) : "; cin>>crit.sc_min; cout<<"\n Enter No. of Seats for SCIENCE stream : "; cin>>crit.seat_sc; cout<<"\n Enter the required marks for COMMERCE stream(in percentage) : "; cin>>crit.com_min; cout<<"\n Enter No. of Seats for COMMERCE stream : "; cin>>crit.seat_com; cout<<"\n Enter the required marks for ARTS stream(in percentage) : "; cin>>crit.arts_min; cout<<"\n Enter No. of Seats for ARTS stream : "; cin>>crit.seat_arts; fout.write((char*)& crit,sizeof(crit)); fout.close(); } 74

Enrolment no.: 084627482


void read_criteria() { fstream fin; fin.open("criteria" ,ios::in); fin.read((char*)& crit,sizeof(crit)); fin.close(); } void student1::input_data() { clrscr(); fstream fin; fin.open("student1",ios::app|ios::out); char t[2], ans; while(1) { cout<<"\n Enter the name of the student : "; gets(name); cout<<"\n\n Enter the roll of the student : "; cin>>regno; cout<<"\n\n Enter marks in eng : "; cin>>m_eng; cout<<"\n\nEnter marks in math : "; cin>>m_math; cout<<"\n\nEnter marks in science : "; cin>>m_sc; cout<<"\n\nEnter marks in sst : "; cin>>m_sst; cout<<"\n\nEnter marks in language : "; cin>>m_lang; cout<<"\n\n=========STREAM PREFERED ?=========== \n"; cout<<"\t"<<"[1] for SCIENCE\n"; cout<<"\t"<<"[2] for COMMERCE\n"; cout<<"\t"<<"[3] for ARTS "; cout<<"\n\n\t ENTER PREFERENCE CODE : \n "; cin>>pref_code; stream=-1; fin.write((char*)&s,sizeof(s)); cin.getline(t,2); cout<<"\n\tEnter More Student ? (y/n)"; cin>>ans; if(ans=='n') 75

Enrolment no.: 084627482


break; } fin.close(); } void student1::new_file() { clrscr(); fstream fin; fin.open("student1",ios::out); char t[2], ans; while(1) { cout<<"\nEnter the name of the student : "; gets(name); cout<<"\n\nEnter the roll of the student : "; cin>>regno; cout<<"\n\nEnter marks in eng : "; cin>>m_eng; cout<<"\n\nEnter marks in math : "; cin>>m_math; cout<<"\n\nEnter marks in science : "; cin>>m_sc; cout<<"\n\nEnter marks in sst : "; cin>>m_sst; cout<<"\n\nEnter marks in language : "; cin>>m_lang; cout<<"\n\n"; cout<<"=========STREAM PREFERED?========= \n"; cout<<"\t"<<"[1] for SCIENCE\n"; cout<<"\t"<<"[2] for COMMERCE\n"; cout<<"\t"<<"[3] for ARTS "; cout<<"\n\n\t ENTER PREFERENCE CODE : \n"; cin>>pref_code; stream=-1; fin.write((char*)&s,sizeof(s)); cin.getline(t,2); cout<<"\n\t Enter More Student ? (y/n) : "; cin>>ans; if (ans=='n') break; } 76

Enrolment no.: 084627482


fin.close(); } void student1::display() { cout<<"\n======================================= =====\n"; cout<<"\n\tNAME : "<<name; cout<<"\n\tREGISTRATION NO. : "<<regno; cout<<"\n\tPERCENTAGE OF MARKS : "<<( (m_eng+m_math+m_sc+m_sst+m_lang)/5)<<"%"; cout<<"\n\tSTREAM APPLIED FOR : "<<stream_name(pref_code); cout<<"\n======================================= =====\n"; } void read_student1() { fstream fin; char c; fin.open("student1" ,ios::in); while(fin.read((char*)& s,sizeof(s))) { s.display(); cout<<"\n\tPress any no. to continue "; cin>>c; cout<<"\n"; } fin.close(); } void read_eligible_sc() { char ans; fstream fout; fout.open("elig_sc",ios::in); fout.seekg(0); while(fout.read((char*)& s,sizeof(s))) { s.display(); cout<<"\n\t Continue (y/n)? "; cin>>ans; if(ans=='n') break; } 77

Enrolment no.: 084627482


fout.close(); } void read_eligible_com() { char ans; fstream fout; fout.open("eligcom",ios::in); while(fout.read((char*)& s,sizeof(s))) { s.display(); cout<<"\n\t Continue (y/n)? "; cin>>ans; if(ans=='n') break; } fout.close(); } void read_eligible_arts() { char ans; fstream fout; fout.open("eligart",ios::in); while(fout.read((char*)& s,sizeof(s))) { s.display(); cout<<"\n\t Continue (y/n)? "; cin>>ans; if(ans=='n') break; } fout.close(); } void clear() { for(int i=1;i<=24;i++) cout<<"\n"; } char * stream_name(int strm) { switch(strm) { 78

Enrolment no.: 084627482


case 1: return("Science"); case 2: return("Commerce"); case 3: return("Arts"); default: return("None"); } } void select_list( char *in_file, char *out_file) { fstream sel, fin; int n=0, i,j; student1 sl[100], t; sel.open(out_file, ios::out); fin.open(in_file,ios::in); while(fin.read((char*)& sl[n],sizeof(s))) { n++; } cout<<"\nNo of Eligible Students = "<<n<<"\n"; for(i=0;i<n;i++) { for(j=i+1;j<=n;j++) { if ( sl[i].show_per()<sl[j].show_per()) { t=sl[j]; sl[j]=sl[i]; sl[i]=t; } } } for(i=0;i<n;i++) { sel.write((char*)& sl[i],sizeof(s)); } sel.close(); fin.close(); } getch(); 79

Enrolment no.: 084627482

/******************************************* // STUDENT MANAGEMENT *******************************************/ int menu(int,int,int,char a[25],char b[25],char c[25],char d[25],char e[25],char sl1[2],char sl2[2],char title[40],char under[2]); void menu1(); void student_menu(); void man(); void mark_menu(); int records=0; void message(int x,int y,int lines,char a[50],char b[50],char c[50], char d[50],char e[50],char f[10],int back) { int l,i,j; char f1[10]; l=strlen(a); if(l<strlen(b)) l=strlen(b); if(l<strlen(c)) l=strlen(c); if(l<strlen(d)) l=strlen(d); if(l<strlen(e)) l=strlen(e); if(l<strlen(f)) l=strlen(f); l+=4; textbackground(back); for(i=1;i<l+2;i++) for(j=1;j<lines+4;j++) { gotoxy(i+x,j+y); cputs(" "); } gotoxy(x,y); cputs(""); for(i=x+1;i<l+x+1;i++) { gotoxy(i,y); 80

Enrolment no.: 084627482


cputs(""); gotoxy(i,y+lines+3); cputs(""); } gotoxy(x+1+l,y); cputs(""); for(i=y+1;i<lines+4+y;i++) { gotoxy(x,i); cputs(""); gotoxy(x+l+1,i); cputs(""); } gotoxy(x,y+lines+3); cputs(""); gotoxy(x+l+1,y+lines+3); cputs(""); j=l-strlen(a); j=j/2; gotoxy(j+x+1,++y); cputs(a); j=l-strlen(b); j=j/2; gotoxy(x+j+1,y+1); cputs(b); j=l-strlen(c); j=j/2; gotoxy(x+j+1,2+y); cputs(c); j=l-strlen(d); j=j/2; gotoxy(x+j+1,3+y); cputs(d); j=l-strlen(e); j=j/2; gotoxy(x+j+1,4+y); cputs(e); j=l-strlen(f)-3; j=j/2; gotoxy(x+j+1,y+lines+1); strcat(f1," "); strcat(f1,f); 81

Enrolment no.: 084627482


strcat(f1," "); textbackground(BLACK); cputs(f1); textcolor(BLACK); for(i=0;i<lines+3;i++) { gotoxy(x+l+2,i+y); cputs(""); } for(i=1;i<l+3;i++) { gotoxy(x+i,y+lines+3); cputs(""); } } struct s_date { int dd,mm,yyyy; }; //DEFINING OF Stuctures struct student2 { char address[30]; char fname[30]; int redgno; s_date dob; char clas[5]; char name[20]; int sub1,sub2,sub3,sub4,sub5,total; float avg,pre; char div[10]; char st_code[10]; }s2[10]; /****************************Function To Add Data***************************/ void add() { textbackground(16); textcolor(7); int i=0; char ch='y'; char fn[20]; 82

Enrolment no.: 084627482


fstream file; do { records++; ss: clrscr(); int st; int t_redg,mark; gotoxy(20,2); cout<<"Students Data Collector"; gotoxy(20,3); cout<<"======================="; gotoxy(19,7); cout<<"Enter The Following"; gotoxy(19,8); cout<<"Registaration No:"; gotoxy(36,8); cin>>t_redg; s2[i].redgno=t_redg; gotoxy(20,10); cout<<"Name :"; gotoxy(35,10); gets(s2[i].name); gotoxy(20,12); cout<<"Address :"; gotoxy(35,12); gets(s2[i].address); gotoxy(20,14); cout<<"Father's Name :"; gotoxy(35,14); gets(s2[i].fname); gotoxy(20,16); cout<<"Class :"; gotoxy(35,16); gets(s2[i].clas); gotoxy(20,18); cout<<"Date Of Birth :DD MM YYYY"; gotoxy(35,18); cin>>s2[i].dob.dd>>s2[i].dob.mm>>s2[i].dob.yyyy; sa: clrscr(); gotoxy(20,2); 83

Enrolment no.: 084627482


cout<<"Student Data Entry Form"; gotoxy(20,3); cout<<"======================="; gotoxy(10,7); cout<<"Enter The Stream Code:\n1.Science Stream\n2.Commerce Streame"; gotoxy(32,7); cin>>st; switch(st) { case 1:strcpy(s2[i].st_code,"Science"); break; case 2:strcpy(s2[i].st_code,"Commerce"); break; default:cout<<"\n\t\t\tInvalid Type.\n\nDo you want to continue?(Y/N)..."; cin>>ch; if (ch=='y'||ch=='Y') { clrscr(); goto sa; } else add(); } clrscr(); gotoxy(20,2); cout<<"Student Data Entry Form"; gotoxy(20,3); cout<<"======================="; gotoxy(10,5); cout<<"Enter The Following Marks"; gotoxy(10,10); cout<<"Sub1(Eng/Eng):"; //Sub 1 gotoxy(30,10); cin>>s2[i].sub1; gotoxy(10,12); cout<<"Sub2(Math/A/C):"; //Sub 2 gotoxy(30,12); cin>>s2[i].sub2; gotoxy(10,14); cout<<"Sub3(Phy/Eco):"; //Sub 3 gotoxy(30,14); cin>>s2[i].sub3; 84

Enrolment no.: 084627482


gotoxy(10,16); cout<<"Sub4(Chem/B.st):"; //Sub 4 gotoxy(30,16); cin>>s2[i].sub4; gotoxy(10,18); //Sub 5 cout<<"Sub5(Bio/Comp):"; gotoxy(30,18); cin>>s2[i].sub5; s2[i].total=s2[i].sub1+s2[i].sub2+s2[i].sub3+s2[i].sub4+s2[i].sub5; if((s2[i].sub1<33)||(s2[i].sub2<33)||(s2[i].sub3<33)||(s2[i].sub4<33)|| (s2[i].sub5<33)) strcpy(s2[i].div,"Fail"); else if(s2[i].total>=375) strcpy(s2[i].div,"Distintion"); else if((s2[i].total>=300)&&(s2[i].total<375)) strcpy(s2[i].div,"First Class"); else if((s2[i].total>=250)&&(s2[i].total<300)) strcpy(s2[i].div,"Second Class"); else if(s2[i].total<165) strcpy(s2[i].div,"Fail"); strcat(fn,s2[i].name); strcat(fn,".txt"); file.open(fn,ios::out); if(!file) { gotoxy(25,79); cout<<"."; } file<<" Report Card Of "<<s2[i].name <<"\nRegistration Number:"<<s2[i].redgno<<"\nClass:"<<s2[i].clas <<"\nAddress:"<<s2[i].address<<"\nFather's Name:"<<s2[i].fname <<"\nDate Of Birth:"<<s2[i].dob.dd<<"-"<<s2[i].dob.mm<<"-"<<s2[i].dob.yyyy <<"\nStream:"<<s2[i].st_code<<"\n\n\ -------------------------------------------------------------------------------\ \nSubject Marks\n-------------\nSubject 1 :" <<s2[i].sub1<<"\nSubject 2 :"<<s2[i].sub2<<"\nSubject 3 :"<<s2[i].sub3 <<"\nSubject 4 :"<<s2[i].sub4<<"\nSubject 5 :"<<s2[i].sub5 <<"\nTotal :"<<s2[i].total<<"\nGrade :"<<s2[i].div; file.close(); i++; 85

Enrolment no.: 084627482


gotoxy(10,22); cout<<"Want More Record To Be Written?(Y/N)......"; cin>>ch; }while(ch=='y'||ch=='Y'); if(ch=='n'||ch=='N') student_menu(); } /******************************Function To Modify Marks**********************/ void mod() { int regno,flag=0,i; char ch; student2 te; clrscr(); cout<<"\n\nEnter The Reg No to be modified:"; cin>>regno; for(i=0;i<10;i++) { if(s2[i].redgno==regno) { flag=1; cout<<"\nSubject 1 :"<<s2[i].sub1; cout<<"\nDo you want to change this?[y/n]"; ch=getch(); if(ch=='y') { cout<<"\nEnter New Value:"; cin>>te.sub1; s2[i].sub1=te.sub1; } cout<<"\nSubject 2 :"<<s2[i].sub2; cout<<"\nDo you want to change this?[y/n]"; ch=getch(); if(ch=='y') { cout<<"\nEnter New Value:"; cin>>te.sub2; s2[i].sub2=te.sub2; } cout<<"\nSubject 3 :"<<s2[i].sub3; cout<<"\nDo you want to change this?[y/n]"; ch=getch(); 86

Enrolment no.: 084627482


if(ch=='y') { cout<<"\nEnter New Value:"; cin>>te.sub3; s2[i].sub3=te.sub3; } cout<<"\nSubject 4 :"<<s2[i].sub4; cout<<"\nDo you want to change this?[y/n]"; ch=getch(); if(ch=='y') { cout<<"\nEnter New Value:"; cin>>te.sub4; s2[i].sub4=te.sub4; } cout<<"\nSubject 5 :"<<s2[i].sub5; cout<<"\nDo you want to change this?[y/n]"; ch=getch(); if(ch=='y') { cout<<"\nEnter New Value:"; cin>>te.sub5; s2[i].sub5=te.sub5; } } } if(flag==0) cout<<"Invalid Reg No!"; } /***********************Function To Initialize Graphics**********************/ void graph() { int graphdriver = DETECT, graphmode; initgraph(&graphdriver, &graphmode, ""); } /****************************Function To Make Menus**************************/ int menu(int xi,int y,int num,char a[25],char b[25],char c[25],char d[25],char e[25],char sl1[2],char sl2[2],char title[40],char under[2]) { char ch; int key,x=4,sl=1,l,i; clrscr(); 87

Enrolment no.: 084627482


l=strlen(title); gotoxy(xi,y-2); cout<<title; cout<<"\n"; gotoxy(xi,y-1); for(i=0;i<l;i++) cout<<under; gotoxy(xi,y); cout<<sl1<<a<<sl2; gotoxy(xi,y+1); cout<<" "<<b; gotoxy(xi,y+2); cout<<" "<<c; gotoxy(xi,y+3); cout<<" "<<d; gotoxy(xi,y+4); cout<<" "<<e; gotoxy(xi,y+num+1); cout<<"Enter Your Choice:1"; key=bioskey(0); while (key!=7181) { switch(key) { case 18432: clrscr(); l=strlen(title); gotoxy(xi,y-2); cout<<title; cout<<"\n"; gotoxy(xi,y-1); for(i=0;i<l;i++) cout<<under; switch(x) { case 4: if (num==4) goto up4; else if (num==3) goto up3; else if (num==2) goto up2; gotoxy(xi,y); cout<<" "<<a; gotoxy(xi,y+1); cout<<" "<<b; gotoxy(xi,y+2); 88

//UP

Enrolment no.: 084627482


cout<<" "<<c; gotoxy(xi,y+3); cout<<" "<<d; gotoxy(xi,y+4); cout<<sl1<<e<<sl2; gotoxy(xi,y+num+1); cout<<"Enter Your Choice:5";sl=5; if (num==5) x=2; else x=1; break; case 2: up4: gotoxy(xi,y); cout<<" "<<a; gotoxy(xi,y+1); cout<<" "<<b; gotoxy(xi,y+2); cout<<" "<<c; gotoxy(xi,y+3); cout<<sl1<<d<<sl2; gotoxy(xi,y+4); cout<<" "<<e; gotoxy(xi,y+num+1); cout<<"Enter Your Choice:4";sl=4; if (num==5) x=3; else if (num==4) x=3; else x=1; break; case 3: up3: gotoxy(xi,y); cout<<" "<<a; gotoxy(xi,y+1); cout<<" "<<b; gotoxy(xi,y+2); cout<<sl1<<c<<sl2; gotoxy(xi,y+3); cout<<" "<<d; gotoxy(xi,y+4); cout<<" "<<e<<" "; gotoxy(xi,y+num+1); cout<<"Enter Your Choice:3";sl=3; x=1; break; 89

Enrolment no.: 084627482


case 1: up2: gotoxy(xi,y); cout<<" "<<a; gotoxy(xi,y+1); cout<<sl1<<b<<sl2; gotoxy(xi,y+2); cout<<" "<<c; gotoxy(xi,y+3); cout<<" "<<d; gotoxy(xi,y+4); cout<<" "<<e; gotoxy(xi,y+num+1); cout<<"Enter Your Choice:2";sl=2; if (num==5) x=5; else if (num==2) x=5; else x=5; break; case 5: gotoxy(xi,y); cout<<sl1<<a<<sl2; gotoxy(xi,y+1); cout<<" "<<b; gotoxy(xi,y+2); cout<<" "<<c; gotoxy(xi,y+3); cout<<" "<<d; gotoxy(xi,y+4); cout<<" "<<e; gotoxy(xi,y+num+1); cout<<"Enter Your Choice:1";sl=1; if (num==5) x=4; else if (num==2) x=1; else if (num==3) x=3; else if (num==4) x=2; break; default:cout<<"Wrong!!2"<<x;getch();exit(0); } break; case 20480: l=strlen(title); gotoxy(xi,y-2); cout<<title; cout<<"\n"; clrscr(); //DOWN

90

Enrolment no.: 084627482


gotoxy(xi,y-1); for(i=0;i<l;i++) cout<<under; switch(x) { case 1: gotoxy(xi,y); cout<<" "<<a<<"\n"<<" "<<b<<"\n"<<" "<<c<<" \n"<<" "<<d<<" \n" <<sl1<<e<<sl2; gotoxy(xi,y+num+1); cout<<"Enter Your Choice:5";sl=5; x=5; break; case 2: gotoxy(xi,y); cout<<" "<<a<<"\n"<<" "<<b<<"\n"<<" "<<c<<" \n"<<sl1<<d<<sl2 <<"\n "<<e<<" \n"; gotoxy(xi,y+num+1); cout<<"Enter Your Choice:4";sl=4; if (num==4) x=5; else x=1; break; case 3: gotoxy(xi,y); cout<<" "<<a<<"\n"<<" "<<b<<"\n"<<sl1<<c<<sl2<<"\n "<<d<<" \n" <<" "<<e<<" "; gotoxy(xi,y+num+1); cout<<"Enter Your Choice:3";sl=3; if (num==5) x=2; else if (num==3) x=5; else x=2; break; case 4: gotoxy(xi,y); cout<<" "<<a<<"\n"<<sl1<<b<<sl2<<"\n "<<c<<" \n"<<" "<<d<<" \n" <<" "<<e<<" \n"; gotoxy(xi,y+num+1); cout<<"Enter Your Choice:2";sl=2; if (num==5) x=3; else if (num==2) x=5; else x=3; break; 91

Enrolment no.: 084627482


case 5: gotoxy(xi,y); cout<<sl1<<a<<sl2<<"\n "<<b<<"\n"<<" "<<c<<" \n"<<" "<<d<<" \n" <<" "<<e<<" \n"; gotoxy(xi,y+num+1); cout<<"Enter Your Choice:1";sl=1; if (num==5) x=4; else if (num==2) x=4; else x=4; break; default:cout<<"Wrong!!2"<<x;getch();exit(0); } break; case 283:sl=6; goto end; case 561:sl=1;goto end; case 818:sl=2;goto end; case 1075:sl=3;goto end; case 1332:sl=4;goto end; case 1589:sl=5;goto end; case 1846:sl=6;goto end; case 7181:goto end; default:break; } key=bioskey(0); } end: return sl; } /***********************************Final Screen*****************************/ void man() { int d=DETECT,m,i; initgraph(&d,&m," "); settextstyle(7,0,7); randomize(); for(i=0;i<5800;i++) putpixel(random(800),random(600),random(15)+1); outtextxy(10,150," See you again!"); getch(); closegraph(); }

92

Enrolment no.: 084627482


********************************Menu To View Marks**************************/ void view() { int opt,i,reg,flag=0; char n[20],ch; view: opt=menu(1,5,5,"1.View All","2.Search Reg No","3.Show Failers","4.Read From File" ,"5.Back","[","]", "Dispay Menu","="); switch(opt) { case 1: //Show All Marks for(i=0;i<10;i++) { clrscr(); if(s2[i].redgno!=NULL) { cout<<" Report Card Of "<<s2[i].name <<"\nRegistration Number:"<<s2[i].redgno<<"\nClass:"<<s2[i].clas <<"\nAddress:"<<s2[i].address<<"\nFather's Name:"<<s2[i].fname <<"\nDate Of Birth:"<<s2[i].dob.dd<<"-"<<s2[i].dob.mm<<"-"<<s2[i].dob.yyyy <<"\nStream:"<<s2[i].st_code<<"\n\n\ -------------------------------------------------------------------------------\ \nSubject Marks\n-------------\nSubject 1 :" <<s2[i].sub1<<"\nSubject 2 :"<<s2[i].sub2<<"\nSubject 3 :"<<s2[i].sub3 <<"\nSubject 4 :"<<s2[i].sub4<<"\nSubject 5 :"<<s2[i].sub5 <<"\nTotal :"<<s2[i].total<<"\nGrade :"<<s2[i].div; cout<<"\n\nPress Any Key To Continue.."; getch(); } else break; } break; case 3:clrscr(); //Show Failers for(i=0;i<records;i++) { if((s2[i].sub1<33)||(s2[i].sub2<33)||(s2[i].sub3<33)||(s2[i].sub4<33)|| (s2[i].sub5<33)) { 93

Enrolment no.: 084627482


cout<<" Report Card Of "<<s2[i].name <<"\nRegistration Number:"<<s2[i].redgno<<"\nClass:"<<s2[i].clas <<"\nAddress:"<<s2[i].address<<"\nFather's Name:"<<s2[i].fname <<"\nDate Of Birth:"<<s2[i].dob.dd<<"-"<<s2[i].dob.mm<<"-"<<s2[i].dob.yyyy <<"\nStream:"<<s2[i].st_code<<"\n\n\ -------------------------------------------------------------------------------\ \nSubject Marks\n-------------\nSubject 1 :" <<s2[i].sub1<<"\nSubject 2 :"<<s2[i].sub2<<"\nSubject 3 :"<<s2[i].sub3 <<"\nSubject 4 :"<<s2[i].sub4<<"\nSubject 5 :"<<s2[i].sub5 <<"\nTotal :"<<s2[i].total<<"\nGrade :"<<s2[i].div; cout<<"\n\nPress Any Key To Continue..."; flag=1; getch(); } } if(flag==0) { cout<<"No Failers Found"; getch(); view(); } break; case 2:clrscr(); //Search By Reg No cout<<"\n\n\tEnter Number To Be Searched:";cin>>reg; for(i=0;i<10;i++) { if(s2[i].redgno==reg) { cout<<" Report Card Of "<<s2[i].name <<"\nRegistration Number:"<<s2[i].redgno<<"\nClass:"<<s2[i].clas <<"\nAddress:"<<s2[i].address<<"\nFather's Name:"<<s2[i].fname <<"\nDate Of Birth:"<<s2[i].dob.dd<<"-"<<s2[i].dob.mm<<"-"<<s2[i].dob.yyyy <<"\nStream:"<<s2[i].st_code<<"\n\n\ -------------------------------------------------------------------------------\ \nSubject Marks\n-------------\nSubject 1 :" <<s2[i].sub1<<"\nSubject 2 :"<<s2[i].sub2<<"\nSubject 3 :"<<s2[i].sub3 <<"\nSubject 4 :"<<s2[i].sub4<<"\nSubject 5 :"<<s2[i].sub5 <<"\nTotal :"<<s2[i].total<<"\nGrade :"<<s2[i].div; 94

Enrolment no.: 084627482


flag=1; getch(); } } if(flag==0) { cout<<"Record Not Found"; getch(); view(); } break; case 4: //Read File clrscr(); cout<<"\n\n\tEnter Name Of Student:"; gets(n); ifstream fil; strcat(n,".txt"); fil.open(n); while(!fil.eof()) { fil.get(ch); cout<<ch; } cout<<"\n\nPress Any Key To Continue..."; getch(); break; case 5:student_menu(); //Exit default:student_menu(); } goto view; } /******************************Student Menu*********************************/ void student_menu() { textbackground(16); textcolor(15); unsigned int tredg; char ch='y',ch1; do { clrscr(); ch1=menu(1,5,3,"1.Add Students","2.Display Student","3.Back","","","[","] " 95

Enrolment no.: 084627482


,"Student Menu","="); switch(ch1) { case 1:clrscr(); //Marks add(); break; case 2:clrscr(); //View Marks view(); break; case 3:menu1(); //Main Menu getch(); break; case 6:menu1(); //Main Menu getch(); break; default:cout<<"\n\nWorng Choice!!"; } cout<<"\n\nDo You Want to Continue?(Y/N)"; cin>>ch; } while(ch=='y'||ch=='Y'); menu1(); } /*********************************Main Menu**********************************/ void menu1() { textbackground(16); textcolor(LIGHTGRAY); char ch1; do{ clrscr(); ch1=menu(1,5,4,"1. Students Details","2. Modify Students","3. Help","4. Exit" ,""," [","]","Student Information System","="); switch(ch1) { case 1:clrscr(); //Student Menu student_menu(); break; case 2:clrscr(); //Marks Menu mark_menu(); 96

Enrolment no.: 084627482


break; //case 3:help(); // break; case 4:clrscr(); //Exit // updown(); man(); exit(0); break; case 6:clrscr(); //Exit // updown(); // man(); // exit(0); break; default:cout<<"\n\nWorng Choice!!"; } }while(ch1==4); } /**********************************Marks Menu********************************/ void mark_menu() { textbackground(BLACK); textcolor(WHITE); int t_redg,i,opt,flag=0; char ch='y',na[20]; do { clrscr(); gotoxy(1,25); cout<<"Press Esc to Quit"; opt=menu(1,5,3,"1.Modify Student","2.Remove Student","3.Back", "",""," [","] "," Menu","="); switch(opt) { case 1: clrscr(); //Modify Student mod(); getch(); mark_menu(); break; case 2: clrscr(); //Delete Student cout<<"Which Student Do you want to Delete\nEnter Reg No:"; cin>>t_redg; 97

Enrolment no.: 084627482


for(i=0;i<10;i++) { if(s2[i].redgno==t_redg) { strcat(na,s2[i].name); strcat(na,".txt"); remove(na); cout<<"The Record of "<<s2[i].name<<" is removed."; flag=1; break; } } if(flag==0) cout<<"Record not found"; mark_menu(); break; default:menu1(); } gotoxy(30,25); cout<<"Do you want to Continue?(Y/N)..."; cin>>ch; }while(ch=='y'||ch=='Y'); if(ch=='n'||ch=='N') menu1(); } /******************************Main Function*********************************/ void School_Management_System::Student_Management() { clrscr(); clrscr(); menu1(); getch(); } /******************************************** // STAFF MANAGEMENT ********************************************/ class staff { protected: int code; 98

Enrolment no.: 084627482


char name[20]; public: void getstaff(void) { cout<<"\n\nEnter code : "; cin>>code; cout<<"Enter name : "; cin>>name; } void dispstaff(void) { cout<<"\nNAME : "<<name; cout<<"\nCODE : "<<code; } }; class teacher : public staff { char sub[20]; char pub[20]; public: void create(void) { getstaff(); cout<<"Enter Subject : "; cin>>sub; cout<<"Enter Publication : "; cin>>pub; } void display(void) { dispstaff(); cout<<"\nSUBJECT : "<<sub; cout<<"\nPUBLICATION: "<<pub; } }; class officer : public staff { char grade; public: void create(void) { getstaff(); 99

Enrolment no.: 084627482


cout<<"Enter Grade : "; cin>>grade; } void display(void) { dispstaff(); cout<<"\nGRADE }

: "<<grade;

}; lass typist : public staff { float speed; public: void gettypist(void) { getstaff(); cout<<"Enter speed (wpm): "; cin>>speed; } void disptypist(void) { dispstaff(); cout<<"\nSPEED : "<<speed; } }; class casual : public typist { float dailywages; public: void create(void) { gettypist(); cout<<"Enter Daily Wages : "; cin>>dailywages; } void display(void) { disptypist(); cout<<"\nDAILY WAGES: "<<dailywages; } }; void School_Management_System::Staff_Management() 100

Enrolment no.: 084627482


{ clrscr(); teacher o1t[10]; casual o1c[10]; officer o1o[10]; int choice,i; char test; while(1) { int count; start: clrscr(); cout<<"\n=====MENU OF STAFF MANAGEMENT=====\n\n\n"; cout<<"\n Choose Category of Information\n"; cout<<"\n\n 1) Teachers\n"; cout<<"\n\n 2) Officer\n"; cout<<"\n\n 3) Typist\n"; cout<<"\n\n 4) BACK TO MAIN MENU\n"; cout<<"\n====================================== =\n"; cout<<"\n\n Enter your choice : "; cin>>choice; switch(choice) { case 1 : while(1) { clrscr(); cout<<"\n=====TEACHERS INFORMATION=====\n\n"; cout<<"\nChoose your choice\n"; cout<<"\n 1) Create\n"; cout<<"\n 2) Display\n"; cout<<"\n 3) Jump Back\n"; cout<<"\n Enter your choice:-"; cin>>choice; switch(choice) { case 1 : for(count=0,i=0;i<10;i++) { cout<<endl; o1t[i].create(); 101

Enrolment no.: 084627482


count++; cout<<endl; cout<<"\n\nAre you Interested in entering data\n"; cout<<"Enter y or n:-"; cin>>test; if(test=='y' || test=='Y') continue; else goto out1; } out1: break; case 2 : for(i=0;i<count;i++) { cout<<endl; o1t[i].display(); cout<<endl; } getch(); break; case 3 : goto start; } } case 2 : while(1) { clrscr(); cout<<"\n=====OFFICERS INFORMATION=====\n\n"; cout<<"\nChoose your choice\n"; cout<<"1) Create\n"; cout<<"2) Display\n"; cout<<"3) Jump Back\n"; cout<<"Enter your choice:-"; cin>>choice; switch(choice) { case 1 : for(count=0,i=0;i<10;i++) { cout<<endl; o1o[i].create(); 102

Enrolment no.: 084627482


count++; cout<<endl; cout<<"\n\nAre you Interested in entering data\n"; cout<<"Enter y or n:-"; cin>>test; if(test=='y' || test=='Y') continue; else goto out2; } out2: break; case 2 : for(i=0;i<count;i++) { cout<<endl; o1o[i].display(); cout<<endl; } getch(); break; case 3 : goto start; } } case 3 : while(1) { clrscr(); cout<<"\n=====TYPIST INFORMATION=====\n\n"; cout<<"\nChoose your choice\n"; cout<<"1) Create\n"; cout<<"2) Display\n"; cout<<"3) Jump BACK\n"; cout<<"Enter your choice:-"; cin>>choice; switch(choice) { case 1 : for(count=0,i=0;i<10;i++) { cout<<endl; o1c[i].create(); 103

Enrolment no.: 084627482


count++; cout<<endl; cout<<"\n\nAre you Interested in entering data\n"; cout<<"Enter y or n:-"; cin>>test; if(test=='y' || test=='Y') continue; else goto out3; } out3: break; case 2 : for(i=0;i<count;i++) { cout<<endl; o1c[i].display(); cout<<endl; } getch(); break; case 3 : goto start; } } case 4 : goto start; } } end: } /******************************************** // LIBRARY MANAGEMENT ********************************************/ // CLASS USED IN PROJECT class book { char bno[6]; char bname[50]; char aname[20]; public: void create_book() { 104

Enrolment no.: 084627482


cout<<"\nNEW BOOK ENTRY...\n"; cout<<"\nEnter The book no."; cin>>bno; cout<<"\n\nEnter The Name of The Book "; gets(bname); cout<<"\n\nEnter The Author's Name "; gets(aname); cout<<"\n\n\nBook Created.."; } void show_book() { cout<<"\n Book no. : "<<bno; cout<<"\n Book Name : "; puts(bname); cout<<"Author Name : "; puts(aname); } void modify_book() { cout<<"\nBook no. : "<<bno; cout<<"\nModify Book Name : "; gets(bname); cout<<"\nModify Author's Name of Book : "; gets(aname); } char* retbno() { return bno; } void report() { cout<<bno<<setw(30)<<bname<<setw(30)<<aname<<endl; } }; //class ends here class student { char admno[6]; char name[20]; char stbno[6]; int token; public: void create_student() 105

Enrolment no.: 084627482


{ clrscr(); cout<<"\nNEW STUDENT ENTRY...\n"; cout<<"\nEnter The admission no. "; cin>>admno; cout<<"\n\nEnter The Name of The Student "; gets(name); token=0; stbno[0]='/0'; cout<<"\n\nStudent Record Created.."; } void show_student() { cout<<"\nAdmission no. : "<<admno; cout<<"\nStudent Name : "; puts(name); cout<<"\nNo of Book issued : "<<token; if(token==1) cout<<"\nBook No "<<stbno; } void modify_student() { cout<<"\nAdmission no. : "<<admno; cout<<"\nModify Student Name : "; gets(name); } char* retadmno() { return admno; } char* retstbno() { return stbno; } int rettoken() { return token; } void addtoken() { token=1; } 106

Enrolment no.: 084627482


void resettoken() { token=0; } void getstbno(char t[]) { strcpy(stbno,t); } void report() {

cout<<"\t"<<admno<<setw(20)<<name<<setw(10)<<token<<endl; } }; //class ends here // global declaration for stream object, object fstream fp,fp1; book bk; student st; // function to write in file void write_book() { char ch; fp.open("book.dat",ios::out|ios::app); do{ clrscr(); bk.create_book(); fp.write((char*)&bk,sizeof(book)); cout<<"\n\nDo you want to add more record..(y/n?)"; cin>>ch; }while(ch=='y'||ch=='Y'); fp.close(); } void write_student() { char ch; fp.open("student.dat",ios::out|ios::app); do{ st.create_student(); fp.write((char*)&st,sizeof(student)); cout<<"\n\ndo you want to add more record..(y/n?)"; cin>>ch; 107

Enrolment no.: 084627482


}while(ch=='y'||ch=='Y'); fp.close(); } // function to read specific record from file void display_spb(char n[]) { cout<<"\n BOOK DETAILS\n"; int flag=0; fp.open("book.dat",ios::in); while(fp.read((char*)&bk,sizeof(book))) { if(strcmpi(bk.retbno(),n)==0) { bk.show_book(); flag=1; } } fp.close(); if(flag==0) cout<<"\n\n Book does not exist"; getch(); } void display_sps(char n[]) { cout<<"\n STUDENT DETAILS\n"; int flag=0; fp.open("student.dat",ios::in); while(fp.read((char*)&st,sizeof(student))) { if((strcmpi(st.retadmno(),n)==0)) { st.show_student(); flag=1; } } fp.close(); if(flag==0) cout<<"\n\n Student does not exist"; getch(); } // function to modify record of file void modify_book() 108

Enrolment no.: 084627482


{ char n[6]; int found=0; clrscr(); cout<<"\n\n\t MODIFY BOOK REOCORD.... "; cout<<"\n\n\t Enter The book no. of The book"; cin>>n; fp.open("book.dat",ios::in|ios::out); while(fp.read((char*)&bk,sizeof(book)) && found==0) { if(strcmpi(bk.retbno(),n)==0) { bk.show_book(); cout<<"\nEnter The New Details of book"<<endl; bk.modify_book(); int pos=-1*sizeof(bk); fp.seekp(pos,ios::cur); fp.write((char*)&bk,sizeof(book)); cout<<"\n\n\t Record Updated"; found=1; } } fp.close(); if(found==0) cout<<"\n\n Record Not Found "; getch(); } void modify_student() { char n[6]; int found=0; clrscr(); cout<<"\n\n\tMODIFY STUDENT RECORD... "; cout<<"\n\n\tEnter The admission no. of The student"; cin>>n; fp.open("student.dat",ios::in|ios::out); while(fp.read((char*)&st,sizeof(student)) && found==0) { if(strcmpi(st.retadmno(),n)==0) { st.show_student(); cout<<"\nEnter The New Details of student"<<endl; 109

Enrolment no.: 084627482


st.modify_student(); int pos=-1*sizeof(st); fp.seekp(pos,ios::cur); fp.write((char*)&st,sizeof(student)); cout<<"\n\n\t Record Updated"; found=1; } } fp.close(); if(found==0) cout<<"\n\n Record Not Found "; getch(); } // function to delete record of file void delete_student() { char n[6]; int flag=0; clrscr(); cout<<"\n\n\n\tDELETE STUDENT..."; cout<<"\n\nEnter The admission no. of the Student You Want To Delete : "; cin>>n; fp.open("student.dat",ios::in|ios::out); fstream fp2; fp2.open("Temp.dat",ios::out); fp.seekg(0,ios::beg); while(fp.read((char*)&st,sizeof(student))) { if(strcmpi(st.retadmno(),n)!=0) fp2.write((char*)&st,sizeof(student)); else flag=1; } fp2.close(); fp.close(); remove("student.dat"); rename("Temp.dat","student.dat"); if(flag==1) cout<<"\n\n\tRecord Deleted .."; else cout<<"\n\nRecord not found"; 110

Enrolment no.: 084627482


getch(); } void delete_book() { char n[6]; clrscr(); cout<<"\n\n\n\tDELETE BOOK ..."; cout<<"\n\nEnter The Book no. of the Book You Want To Delete : "; cin>>n; fp.open("book.dat",ios::in|ios::out); fstream fp2; fp2.open("Temp.dat",ios::out); fp.seekg(0,ios::beg); while(fp.read((char*)&bk,sizeof(book))) { if(strcmpi(bk.retbno(),n)!=0) //change later { fp2.write((char*)&bk,sizeof(book)); } } fp2.close(); fp.close(); remove("book.dat"); rename("Temp.dat","book.dat"); cout<<"\n\n\tRecord Deleted .."; getch(); } // function to display all students list void display_alls() { clrscr(); fp.open("student.dat",ios::in); if(!fp) { cout<<"ERROR!!! FILE COULD NOT BE OPEN "; getch(); return; } cout<<"\n\n\t\tSTUDENT LIST\n\n"; cout<<"========================================= =========================\n";

111

Enrolment no.: 084627482


cout<<"\tAdmission No."<<setw(10)<<"Name"<<setw(20)<<"Book Issued\n"; cout<<"========================================= =========================\n"; while(fp.read((char*)&st,sizeof(student))) { st.report(); } fp.close(); getch(); } // function to display Books list void display_allb() { clrscr(); fp.open("book.dat",ios::in); if(!fp) { cout<<"ERROR!!! FILE COULD NOT BE OPEN "; getch(); return; } cout<<"\n\n\t\tBook LIST\n\n"; cout<<"========================================= ===========================\n"; cout<<"Book Number"<<setw(20)<<"Book Name"<<setw(25)<<"Author\n"; cout<<"========================================= ============================\n"; while(fp.read((char*)&bk,sizeof(book))) { bk.report(); } fp.close(); getch(); } // function to issue book void book_issue() { char sn[6],bn[6]; int found=0,flag=0; clrscr(); 112

Enrolment no.: 084627482


cout<<"\n\nBOOK ISSUE ..."; cout<<"\n\n\tEnter The student's admission no."; cin>>sn; fp.open("student.dat",ios::in|ios::out); fp1.open("book.dat",ios::in|ios::out); while(fp.read((char*)&st,sizeof(student)) && found==0) { if(strcmpi(st.retadmno(),sn)==0) { found=1; if(st.rettoken()==0) { cout<<"\n\n\tEnter the book no. "; cin>>bn; while(fp1.read((char*)&bk,sizeof(book))&& flag==0) { if(strcmpi(bk.retbno(),bn)==0) { bk.show_book(); flag=1; st.addtoken(); st.getstbno(bk.retbno()); int pos=-1*sizeof(st); fp.seekp(pos,ios::cur); fp.write((char*)&st,sizeof(student)); cout<<"\n\n\t Book issued successfully\n\nPlease Note: Write the current date in backside of your book and submit within 15 days fine Rs. 1 for each day after 15 days period"; } } if(flag==0) cout<<"Book no does not exist"; } else cout<<"You have not returned the last book "; } } if(found==0) cout<<"Student record not exist..."; getch(); fp.close(); fp1.close(); 113

Enrolment no.: 084627482


} // function to deposit book void book_deposit() { char sn[6],bn[6]; int found=0,flag=0,day,fine; clrscr(); cout<<"\n\nBOOK DEPOSIT ..."; cout<<"\n\n\tEnter The students admission no."; cin>>sn; fp.open("student.dat",ios::in|ios::out); fp1.open("book.dat",ios::in|ios::out); while(fp.read((char*)&st,sizeof(student)) && found==0) { if(strcmpi(st.retadmno(),sn)==0) { found=1; if(st.rettoken()==1) { while(fp1.read((char*)&bk,sizeof(book))&& flag==0) { if(strcmpi(bk.retbno(),st.retstbno())==0) { bk.show_book(); flag=1; cout<<"\n\nBook deposited in no. of days"; cin>>day; if(day>15) { fine=(day-15)*1; cout<<"\n\nFine has to deposited Rs. "<<fine; } st.resettoken(); int pos=-1*sizeof(st); fp.seekp(pos,ios::cur); fp.write((char*)&st,sizeof(student)); cout<<"\n\n\t Book deposited successfully"; } } if(flag==0) cout<<"Book no does not exist"; } 114

Enrolment no.: 084627482


else cout<<"No book is issued..please check!!"; } } if(found==0) cout<<"Student record not exist..."; getch(); fp.close(); fp1.close(); } // ADMINISTRATOR MENU FUNCTION void admin_menu() { clrscr(); int ch2; cout<<"\n\n\n\tADMINISTRATOR MENU"; cout<<"\n\n\t1.CREATE STUDENT RECORD"; cout<<"\n\n\t2.DISPLAY ALL STUDENTS RECORD"; cout<<"\n\n\t3.DISPLAY SPECIFIC STUDENT RECORD "; cout<<"\n\n\t4.MODIFY STUDENT RECORD"; cout<<"\n\n\t5.DELETE STUDENT RECORD"; cout<<"\n\n\t6.CREATE BOOK "; cout<<"\n\n\t7.DISPLAY ALL BOOKS "; cout<<"\n\n\t8.DISPLAY SPECIFIC BOOK "; cout<<"\n\n\t9.MODIFY BOOK "; cout<<"\n\n\t10.DELETE BOOK "; cout<<"\n\n\t11.BACK "; cout<<"\n\n\tPlease Enter Your Choice (1-11) "; cin>>ch2; switch(ch2) { case 1: clrscr(); write_student(); break; case 2: display_alls(); break; case 3: char num[6]; clrscr(); cout<<"\n\n\tPlease Enter The Admission No. "; 115

Enrolment no.: 084627482


cin>>num; display_sps(num); break; case 4: modify_student(); break; case 5: delete_student(); break; case 6: clrscr(); write_book(); break; case 7: display_allb(); break; case 8: { char num[6]; clrscr(); cout<<"\n\n\tPlease Enter The book No. "; cin>>num; display_spb(num); break; } case 9: modify_book(); break; case 10: delete_book(); break; case 11: break; default: cout<<"\a"; } admin_menu(); } // FUNCTION OF LIBRARY MANAGEMENT void School_Management_System::Library_Management() { char ch; 116

Enrolment no.: 084627482


do { clrscr(); cout<<"\n\n\t***** MENU OF LIBRARY MANAGEMENT****"; cout<<"\n\n\t 1. BOOK ISSUE"; cout<<"\n\n\t 2. BOOK DEPOSIT"; cout<<"\n\n\t 3. ADMINISTRATOR MENU"; cout<<"\n\n\t 4. EXIT"; cout<<"\n***************************************\n"; cout<<"\n\n\tPlease Select Your Option (1-4) "; ch=getche(); switch(ch) { case '1': clrscr(); book_issue(); break; case '2': book_deposit(); break; case '3': admin_menu(); break; case '4': break; default : cout<<"\a"; } }while(ch!='4'); } /******************************************** // FEES MANAGEMENT ********************************************/ int i,j,li,lp,rec,valid; void help(); // GLOBAL VARIABLE DECLARATIONS //int i,j,li,lp; char ch,choice; // THIS CLASS DRAWS LINES, BOXES, ETC. class DRAW 117

Enrolment no.: 084627482


{ public : void LINE_HOR(int, int, int, char) ; void LINE_VER(int, int, int, char) ; void BOX(int,int,int,int,char) ; }; // THIS CLASS CONTROLS ALL THE FUNCTIONS RELATED TO FEES class FEE { private : int Class ; float tuition, ac, science, computer, activity ; void DISPLAY(int) ; void MODIFY_RECORD(int, float, float, float, float, float) ; public : void ADDITION(void) ; void MODIFICATION(void) ; void FEE_SLIP(void) ; void LIST(void) ; void HELP(void); }fee ; void mainmenu() { clrscr(); textcolor(WHITE); for(li=30;li<=50;li++) { textcolor(WHITE); gotoxy(li,14); delay(30); printf("*"); } for(li=50;li>=30;li--) { textcolor(WHITE); gotoxy(li,30); delay(30); printf("*"); } for(lp=15;lp<30;lp++) { gotoxy(30,lp); 118

Enrolment no.: 084627482


delay(100); printf("|"); } for(lp=29;lp>=15;lp--) { gotoxy(50,lp); delay(100); printf("|"); } gotoxy(15,10); textcolor(LIGHTGRAY); cprintf("Press the corresponding Keys for the desired action"); gotoxy(35,16); textcolor(BROWN); cprintf("F: FEE SLIP"); gotoxy(35,19); textcolor(LIGHTMAGENTA); cprintf("M: MODIFY"); gotoxy(35,22); textcolor(LIGHTBLUE); cprintf("L: LIST"); gotoxy(35,25); textcolor(LIGHTRED); cprintf("H: HELP"); gotoxy(35,28); textcolor(GREEN); cprintf("Q: QUIT"); choice=getch(); ch=toupper(choice); switch(ch) { case'F': fee.FEE_SLIP(); break; case'M': fee.MODIFICATION(); break; case'L': fee.LIST(); break; case'H': fee.HELP(); 119

Enrolment no.: 084627482


break; case'Q': break; } } //Main Menu Function End // FUNCTION TO DRAW HORIZONTAL LINE void DRAW :: LINE_HOR(int column1, int column2, int row, char c) { for ( column1; column1<=column2; column1++ ) { gotoxy(column1,row) ; cout <<c ; } } // FUNCTION TO DRAW VERTICAL LINE void DRAW :: LINE_VER(int row1, int row2, int column, char c) { for ( row1; row1<=row2; row1++ ) { gotoxy(column,row1) ; cout <<c ; } } // FUNCTION TO DRAW BOX LINE void DRAW :: BOX(int column1, int row1, int column2, int row2, char c) { char ch=218 ; char c1, c2, c3, c4 ; char l1=196, l2=179 ; if (c == ch) { c1=218 ; c2=191 ; c3=192 ; c4=217 ; l1 = 196 ; l2 = 179 ; } else { c1=c ; c2=c ; 120

Enrolment no.: 084627482


c3=c ; c4=c ; l1 = c ; l2 = c ; } gotoxy(column1,row1) ; cout <<c1 ; gotoxy(column2,row1) ; cout <<c2 ; gotoxy(column1,row2) ; cout <<c3 ; gotoxy(column2,row2) ; cout <<c4 ; column1++ ; column2-- ; LINE_HOR(column1,column2,row1,l1) ; LINE_HOR(column1,column2,row2,l1) ; column1-- ; column2++ ; row1++ ; row2-- ; LINE_VER(row1,row2,column1,l2) ; LINE_VER(row1,row2,column2,l2) ; } // FUNCTION TO ADD FEE STRUCTURE IN FEE FILE void FEE :: ADDITION(void) { fstream file ; file.open("FEE.DAT", ios::in) ; if (!file.fail()) return ; file.close() ; file.open("FEE.DAT", ios::app) ; for (int i=1; i<=12; i++) { Class = i ; tuition = 0.0 ; ac = 0.0 ; science = 0.0 ; computer= 0.0 ; activity= 0.0 ; file.write((char *) this, sizeof(FEE)) ; 121

Enrolment no.: 084627482


} file.close() ; MODIFY_RECORD(12,450,50,60,60,50) ; MODIFY_RECORD(11,450,50,60,60,50) ; MODIFY_RECORD(10,350,50,30,60,50) ; MODIFY_RECORD(9,350,50,20,60,50) ; MODIFY_RECORD(8,300,50,20,40,50) ; MODIFY_RECORD(7,300,50,20,40,50) ; MODIFY_RECORD(6,300,50,20,40,50) ; MODIFY_RECORD(5,250,50,0,40,40) ; MODIFY_RECORD(4,250,50,0,40,40) ; MODIFY_RECORD(3,250,50,0,40,40) ; MODIFY_RECORD(2,250,50,0,40,40) ; MODIFY_RECORD(1,250,50,0,40,40) ; } // FUNCTION TO DISPLAY TOTAL FEE AS LIST void FEE::LIST() { clrscr() ; DRAW d ; textcolor(MAGENTA); d.BOX(1,2,80,24,218) ; gotoxy(27,3) ; cout <<"TOTAL FEES FOR THE CLASSES" ; d.LINE_HOR(2,79,4,196) ; gotoxy(5,5) ; cout <<"CLASS TOTAL FEES" ; d.LINE_HOR(2,79,6,196) ; d.LINE_HOR(2,79,22,196) ; float total ; int row=8 ; fstream file ; file.open("FEE.DAT", ios::in) ; while (file.read((char *) this, sizeof(FEE))) { total = tuition + ac + science + computer + activity ; gotoxy(6,row) ; cout <<Class ; gotoxy(23,row) ; cout <<total ; row++ ; } 122

Enrolment no.: 084627482


file.close() ; gotoxy(5,23) ; cout <<"Press any key to continue............." ; getch() ; mainmenu(); } // FUNCTION TO DISPLAY THE RECORD FOR THE GIVEN CLASS void FEE :: DISPLAY(int tclass) { fstream file ; file.open("FEE.DAT", ios::in) ; while (file.read((char *) this, sizeof(FEE))) { if (Class == tclass) { gotoxy(5,5) ; cout <<"Class : " <<Class ; gotoxy(5,7) ; cout <<"~~~~~~~~~~~~" ; gotoxy(5,8) ; cout <<"Tution Fee : " <<tuition ; gotoxy(5,9) ; cout <<"Annual charges Fee : " <<ac ; gotoxy(5,10) ; cout <<"Science Fee : " <<science ; gotoxy(5,11) ; cout <<"Computer Fee: " <<computer ; gotoxy(5,12) ; cout <<"Activity Fee : " <<activity ; break ; } } file.close() ; } // FUNCTION TO MODIFY THE FEE RECORD FOR THE GIVEN DATA void FEE :: MODIFY_RECORD(int tclass, float ttution, float tac, float tscience, float tcomputer, float tactivity) { fstream file ; file.open("FEE.DAT", ios::in) ; fstream temp ; 123

Enrolment no.: 084627482


temp.open("temp.dat", ios::out) ; file.seekg(0,ios::beg) ; while (!file.eof()) { file.read((char *) this, sizeof(FEE)) ; if (file.eof()) break ; if (tclass == Class) { Class = tclass ; tuition = ttution ; ac = tac ; science = tscience ; computer= tcomputer ; activity= tactivity ; temp.write((char *) this, sizeof(FEE)) ; } else temp.write((char *) this, sizeof(FEE)) ; } file.close() ; temp.close() ; file.open("FEE.DAT", ios::out) ; temp.open("temp.dat", ios::in) ; temp.seekg(0,ios::beg) ; while (!temp.eof()) { temp.read((char *) this, sizeof(FEE)) ; if (temp.eof()) break ; file.write((char *) this, sizeof(FEE)) ; } file.close() ; temp.close() ; } // FUNCTION TO GIVE DATA TO MODIFY THE FEE RECORD void FEE :: MODIFICATION(void) { clrscr() ; textcolor(WHITE); char ch, t1[10] ; int valid=0, t=0, tclass=0 ; 124

Enrolment no.: 084627482


float t2=0 ; do { valid = 1 ; gotoxy(5,25) ; clreol() ; cout <<"Press <ENTER> for EXIT" ; gotoxy(5,5) ; clreol() ; cout <<"Enter Class for the Modification of the Fee Structure : " ; gets(t1) ; t = atoi(t1) ; tclass = t ; if (strlen(t1) == 0) return ; if (tclass < 1 || tclass > 12) { valid = 0 ; gotoxy(5,25) ; clreol() ; cout <<"7Enter correctly" ; getch() ; } } while (!valid) ; clrscr() ; gotoxy(71,1) ; cout <<"<0>=Exit" ; DISPLAY(tclass) ; gotoxy(5,25) ; clreol() ; do { gotoxy(5,15) ; clreol() ; cout <<"Do you want to modify the fee structure (y/n) : " ; ch = getche() ; if (ch == '0') return ; ch = toupper(ch) ; } while (ch != 'N' && ch != 'Y') ; if (ch == 'N') mainmenu(); float ttution=0.0, tac=0.0, tscience=0.0, tcomputer=0.0, tactivity=0.0; gotoxy(5,13) ; clreol() ; gotoxy(5,17) ; cout <<"Tuition Fee : " ; gotoxy(5,18) ; 125

Enrolment no.: 084627482


cout <<"Annual Charges Fee : " ; gotoxy(5,19) ; cout <<"Science Fee : " ; gotoxy(5,20) ; cout <<"Computer Fee : " ; gotoxy(5,21) ; cout <<"Activity Fee : " ; int modified = 5 ; fstream file ; file.open("FEE.DAT", ios::in) ; while (file.read((char *) this, sizeof(FEE))) if (Class == tclass) break ; file.close() ; do { valid = 1 ; gotoxy(5,27) ; clreol() ; cout <<"Enter TUITION FEE or Press <ENTER> for no change" ; gotoxy(19,17) ; clreol() ; gets(t1) ; t2 = atof(t1) ; ttution = t2 ; if (t1[0] == '0') return; if (strlen(t1) == 0) break ; if (ttution > 1000) { valid = 0 ; gotoxy(5,27) ; clreol() ; cout <<"7Enter correctly" ; getch() ; } } while (!valid) ; if (strlen(t1) == 0) { modified-- ; ttution = tuition ; 126

Enrolment no.: 084627482


gotoxy(20,17) ; cout <<ttution ; } do { valid = 1 ; gotoxy(5,27) ; clreol() ; cout <<"Enter ANNUAL CHARGES fee or Press <ENTER> for no change" ; gotoxy(26,18) ; clreol() ; gets(t1) ; t2 = atof(t1) ; tac = t2 ; if (t1[0] == '0') return ; if (strlen(t1) == 0) break ; if (tac > 1000) { valid = 0 ; gotoxy(5,27) ; clreol() ; cout <<"7Enter correctly" ; getch() ; } } while (!valid) ; if (strlen(t1) == 0) { modified-- ; tac = ac ; gotoxy(26,18) ; cout <<tac ; } do { valid = 1 ; gotoxy(5,27) ; clreol() ; cout <<"Enter SCIENCE FEES or Press <ENTER> for no change" ; gotoxy(19,19) ; clreol() ; 127

Enrolment no.: 084627482


gets(t1) ; t2 = atof(t1) ; tscience = t2 ; if (t1[0] == '0') return ; if (strlen(t1) == 0) break ; if (tscience > 1000) { valid = 0 ; gotoxy(5,27) ; clreol() ; cout <<"7Enter correctly" ; getch() ; } } while (!valid) ; if (strlen(t1) == 0) { modified-- ; tscience = science ; gotoxy(19,19) ; cout <<tscience ; } do { valid = 1 ; gotoxy(5,27) ; clreol() ; cout <<"Enter COMPUTER FEES or Press <ENTER> for no change" ; gotoxy(19,20) ; clreol() ; gets(t1) ; t2 = atof(t1) ; tcomputer = t2 ; if (t1[0] == '0') return ; if (strlen(t1) == 0) break ; if (tcomputer > 1000) { valid = 0 ; gotoxy(5,27) ; 128

Enrolment no.: 084627482


clreol() ; cout <<"7Enter correctly" ; getch() ; } } while (!valid) ; if (strlen(t1) == 0) { modified-- ; tcomputer = computer ; gotoxy(19,20) ; cout <<tcomputer ; } do { valid = 1 ; gotoxy(5,27) ; clreol() ; cout <<"Enter ACTIVITY FEES or Press <ENTER> for no change" ; gotoxy(19,21) ; clreol() ; gets(t1) ; t2 = atof(t1) ; tactivity = t2 ; if (t1[0] == '0') return; if (strlen(t1) == 0) break; if (tactivity > 1000) { valid = 0 ; gotoxy(5,27) ; clreol() ; cout <<"7Enter correctly" ; getch() ; } } while (!valid) ; if (strlen(t1) == 0) { modified-- ; tactivity = activity ; gotoxy(19,21) ; cout <<tactivity ; 129

Enrolment no.: 084627482


} if (!modified) mainmenu(); gotoxy(5,27) ; clreol() ; do { gotoxy(5,25) ; clreol() ; cout <<"Do you want to save (y/n) : " ; ch = getche() ; if (ch == '0') return ; ch = toupper(ch) ; } while (ch != 'N' && ch != 'Y') ; if (ch == 'N') return ; MODIFY_RECORD(tclass,ttution,tac,tscience,tcomputer,tactivity); gotoxy(5,27) ; cout <<"7Record Modified" ; gotoxy(5,29) ; cout <<"Press any key to continue..........." ; getch() ; mainmenu(); } // FUNCTION TO DISPLAY THE FEE SLIP FOR THE CLASS void FEE :: FEE_SLIP(void) { clrscr() ; textcolor(RED); char ch, t1[10] ; int valid=0, t=0, tclass=0 ; do { valid = 1 ; gotoxy(5,25) ; clreol() ; cout <<"Press <ENTER> for EXIT" ; gotoxy(5,5) ; clreol() ; cout <<"Enter Class to see the Fee Structure : " ; gets(t1) ; 130

Enrolment no.: 084627482


t = atoi(t1) ; tclass = t ; if (strlen(t1) == 0) return ; if (tclass < 1 || tclass > 12) { valid = 0 ; gotoxy(5,25) ; clreol() ; cout <<"7Enter correctly" ; getch() ; } } while (!valid) ; char name[26] ; do { gotoxy(5,25) ; clreol() ; cout <<"ENTER NAME OF THE STUDENT" ; valid = 1 ; gotoxy(5,7) ; clreol() ; cout <<"Name : " ; gets(name) ; if (strlen(name) < 1 || strlen(name) > 25) { valid = 0 ; gotoxy(5,25) ; clreol() ; cout <<"NAME SHOULD NOT BE GREATER THAN 25" ; getch() ; } } while (!valid) ; clrscr() ; DRAW d ; d.BOX(20,2,61,24,987) ; gotoxy(24,3) ; cout <<" YOUR SCHOOL "; int d1, m1, y1 ; struct date dt; getdate(&dt); d1 = dt.da_day ; 131

Enrolment no.: 084627482


m1 = dt.da_mon ; y1 = dt.da_year ; gotoxy(45,4) ; cout <<"Date: " <<d1 <<"/" <<m1 <<"/" <<y1 ; d.LINE_HOR(21,60,5,196) ; gotoxy(22,6) ; cout <<"NAME : " <<name ; gotoxy(22,7) ; cout <<"CLASS : " <<tclass ; d.LINE_HOR(21,60,8,196) ; gotoxy(21,9) ; cout <<" PARTICULARS AMOUNT" ; d.LINE_HOR(21,60,10,196) ; d.LINE_HOR(21,60,22,196) ; d.LINE_HOR(46,60,20,196) ; gotoxy(25,21) ; cout <<"TOTAL" ; gotoxy(54,23) ; cout <<"CASHIER" ; fstream file ; file.open("FEE.DAT", ios::in) ; while (file.read((char *) this, sizeof(FEE))) if (Class == tclass) break ; file.close() ; float total=0.0 ; gotoxy(23,12) ; cout <<"Tuition fees " <<setprecision(2) <<tuition ; total = total+tuition ; gotoxy(23,13) ; cout <<"Annual charges fees " <<setprecision(2) <<ac ; total = total+ac ; gotoxy(23,14) ; cout <<"Science fees " <<setprecision(2) <<science ; total = total+science ; gotoxy(23,15) ; cout <<"Computer fees " <<setprecision(2) <<computer ; total = total+computer ; gotoxy(23,16) ; cout <<"Activity fees " <<setprecision(2) <<activity ; total = total+activity ; d.LINE_VER(9,21,46,179) ; 132

Enrolment no.: 084627482


char tt[15] ; sprintf(tt,"%f",total) ; gotoxy(49,21) ; cout <<tt ; gotoxy(33,40); cout<<"Press any key to return to the main menu........"; getch() ; mainmenu(); } void FEE::HELP() { clrscr(); textcolor(WHITE); cout<<"This is a fee structure program \n"; cout<<"It can be used to : \n "; cout<<"1. View the fee slip of a student of a class \n"; cout<<"2. Modify the fee structure of the school \n"; cout<<"3. View the fee structure of the school in the form of alist \n"; cout<<"The menu functions are described as follows \n"; cout<<"1. Fee_Management SLIP: This function displays the fee slip for a givenstudent \n"; cout<<" from the class entered by the user. "; cout<<"2. MODIFY: This function modifies the fee structure for a give class."; cout<<" The user can change the fees for various fields"; cout<<"3. LIST: This function displays the list of total fees for all the"; cout<<"classes in the school "; cout<<"If you encounter any problems, just press ctrl+break. You will get out "; cout<<"of the program."; getch(); cout<<"Press any key to continue..........."; getch(); mainmenu(); } void School_Management_System::Fees_Management() { FEE fee; fee.ADDITION(); clrscr(); getch(); mainmenu(); 133

Enrolment no.: 084627482


}

/************************************************ // EXAMINATION MANAGEMENT ************************************************/ int s_menu1(); int ss_menu1(int u); struct pass { char username[15]; char password[8]; }str; class student5 { struct data { char name[30]; int roll; int class1; int marks[5]; float total; float percent; char branch[5]; }d1; public: void mark_entry(); void plist1(); void plist2(); void plist3(); void plist4(); void plist5(); void plist6(); void moddata1(); void moddata2(); void moddata3(); void moddata4(); void moddata5(); void moddata6(); void displaydata(); void deldata1(); void deldata2(); 134

Enrolment no.: 084627482


void void void void void void void void void void void void void void void void deldata3(); deldata4(); deldata5(); deldata6(); yourdata1(); yourdata2(); yourdata3(); yourdata4(); yourdata5(); yourdata6(); showdata1(); showdata2(); showdata3(); showdata4(); showdata5(); showdata6();

}s1; int s_menu(); int ss_menu(int u); int s_menu1() { int ch1; cleardevice(); outtextxy(10,20,"1. UNIT TEST.\n"); outtextxy(10,40,"2. HALF YEARLY.\n"); outtextxy(10,60,"3. ANNUALS.\n"); outtextxy(10,80," ENTER YOUR CHOICE:"); gotoxy(30,6); cin>>ch1; return(ch1); } int ss_menu1(int u) { cleardevice(); int ch2,san; switch(u) { case 1: outtextxy(10,10," 011--> 1st UNIT TEST.\n"); outtextxy(10,30," 022--> 2nd UNIT TEST.\n"); outtextxy(10,50," 033--> 3rd UNIT TEST.\n"); outtextxy(10,70," 044--> 4th UNIT TEST.\n"); 135

Enrolment no.: 084627482


outtextxy(10,90," ENTER YOUR CHOICE: "); gotoxy(30,7); cin>>ch2; san=ch2; break; case 2: san=u; break; case 3: san=u; break; }; return(san); } void student5::mark_entry() { cleardevice(); outtextxy(10,10,"Enter your Roll number:"); gotoxy(35,2); cin>>d1.roll; outtextxy(10,30,"Enter your Name:"); gotoxy(35,3); gets(d1.name); outtextxy(10,60,"Enter your Class:"); gotoxy(35,5); cin>>d1.class1; if (d1.class1<11) { cleardevice(); outtextxy(10,30,"Enter marks in English:"); gotoxy(35,3); cin>>d1.marks[0]; outtextxy(10,60,"Enter marks in Hindi:"); gotoxy(35,5); cin>>d1.marks[1]; outtextxy(10,90,"Enter marks in Maths:"); gotoxy(35,7); cin>>d1.marks[2]; outtextxy(10,120,"Enter marks in Science:"); gotoxy(35,9); cin>>d1.marks[3]; outtextxy(10,150,"Enter marks in Social:"); gotoxy(35,11); cin>>d1.marks[4]; 136

Enrolment no.: 084627482


if(d1.class1<9) { outtextxy(10,180,"Enter marks in Sanskrit:"); gotoxy(35,13); cin>>d1.marks[5]; } } else { cleardevice(); outtextxy(10,30," Enter your branch(PCMC.PCMP,PCMB,PCBI,PCBP)"); gotoxy(60,3); gets(d1.branch); outtextxy(10,60," Enter marks in Physics:"); gotoxy(35,5); cin>>d1.marks[0]; outtextxy(10,90," Enter marks in Chemistry:"); gotoxy(35,7); cin>>d1.marks[1]; outtextxy(10,120," Enter marks in English:"); gotoxy(35,9); cin>>d1.marks[2]; if(strcmp(d1.branch,"PCMC")==0) { outtextxy(10,150," Enter marks in Computer:"); gotoxy(35,11); cin>>d1.marks[3]; outtextxy(10,180," Enter marks in Maths:"); gotoxy(35,13); cin>>d1.marks[4]; } else if(strcmp(d1.branch,"PCBI")==0) { outtextxy(10,150," Enter marks in Biology:"); gotoxy(35,11); cin>>d1.marks[3]; outtextxy(10,180,"Enter marks in I.P:"); gotoxy(35,13); cin>>d1.marks[4]; } else if(strcmp(d1.branch,"PCMP")==0) { 137

Enrolment no.: 084627482


outtextxy(10,150," Enter marks in Physical Education:"); gotoxy(35,11); cin>>d1.marks[3]; outtextxy(10,180," Enter marks in Maths:"); gotoxy(35,13); cin>>d1.marks[4]; } else if(strcmp(d1.branch,"PCBP")==0) { outtextxy(10,150," Enter marks in Physical Education:"); gotoxy(35,11); cin>>d1.marks[3]; outtextxy(10,180,"Enter marks in Biology:"); gotoxy(35,13); cin>>d1.marks[4]; } else if(strcmp(d1.branch,"PCMB")==0) { outtextxy(10,150," Enter marks in Maths:"); gotoxy(35,11); cin>>d1.marks[3]; outtextxy(10,180,"Enter marks in Biology:"); gotoxy(35,13); cin>>d1.marks[4]; } } float sum=0; if(d1.class1<9) { for(int i=0;i<5;i++) sum=d1.marks[i]+sum; d1.total=sum; d1.percent=sum/6; } else { for(int i=0;i<5;i++) sum=d1.marks[i]+sum; d1.total=sum; d1.percent=sum/5; } } 138

Enrolment no.: 084627482


void student5::yourdata1() { int size; char ch3='Y',ch4; ofstream unitfile1; unitfile1.open("TEST1.TXT",ios::app); size=sizeof(d1); while((ch3=='y')||(ch3=='Y')) { s1.mark_entry(); outtextxy(10,210," Do you want to add more:"); gotoxy(40,15); cin>>ch4; ch3=ch4; unitfile1.write((char *)&s1,size); cleardevice(); } unitfile1.close(); } void student5::yourdata2() { int size; char ch5='Y',ch6; ofstream unitfile2; unitfile2.open("TEST2.TXT",ios::app); size=sizeof(d1); while((ch5=='y')||(ch5=='Y')) { s1.mark_entry(); outtextxy(10,210," Do you want to add more:"); gotoxy(40,15); cin>>ch6; ch5=ch6; unitfile2.write((char *)&s1,size); cleardevice(); } unitfile2.close(); } void student5::yourdata3() { int size; char ch5='Y',ch6; 139

Enrolment no.: 084627482


ofstream unitfile3; unitfile3.open("TEST3.TXT",ios::app); size=sizeof(d1); while((ch5=='y')||(ch5=='Y')) { s1.mark_entry(); outtextxy(10,210," Do you want to add more:"); gotoxy(40,15); cin>>ch6; ch5=ch6; unitfile3.write((char *)&s1,size); cleardevice(); } unitfile3.close(); } void student5::yourdata4() { int size; char ch5='Y',ch6; ofstream unitfile4; unitfile4.open("TEST4.TXT",ios::app); size=sizeof(d1); while((ch5=='y')||(ch5=='Y')) { s1.mark_entry(); outtextxy(10,210," Do you want to add more:"); gotoxy(40,15); cin>>ch6; ch5=ch6; unitfile4.write((char *)&s1,size); cleardevice(); } unitfile4.close(); } void student5::yourdata5() { int size; char ch5='Y',ch6; ofstream unitfile5; unitfile5.open("TEST5.TXT",ios::app); size=sizeof(d1); while((ch5=='y')||(ch5=='Y')) 140

Enrolment no.: 084627482


{ s1.mark_entry(); outtextxy(10,210," Do you want to add more:"); gotoxy(40,15); cin>>ch6; ch5=ch6; unitfile5.write((char *)&s1,size); cleardevice(); } unitfile5.close(); } void student5::yourdata6() { int size; char ch5='Y',ch6; ofstream unitfile6; unitfile6.open("TEST6.TXT",ios::app); size=sizeof(d1); while((ch5=='y')||(ch5=='Y')) { s1.mark_entry(); outtextxy(10,210," Do you want to add more:"); gotoxy(40,15); cin>>ch6; ch5=ch6; unitfile6.write((char *)&s1,size); cleardevice(); } unitfile6.close(); } void School_Management_System::Examination_Management() { int gdrivers=DETECT,gmode,errorcode; initgraph(&gdrivers,&gmode,"c:\\tc\\bgi"); int ch=0,u,uu; char username1[15],password1[8]; ifstream passfile; passfile.open("PASS.TXT"); int si=sizeof(pass); getch(); cleardevice(); outtextxy(10,80,"Enter your user name :"); 141

Enrolment no.: 084627482


gotoxy(35,6); gets(username1); outtextxy(10,110,"Enter your password:"); gotoxy(35,8); gets(password1); passfile.seekg(0); int found=0; while(!passfile.eof()) { passfile.read((char *)&str,si); if(strcmpi(str.username,username1)==0) { if(strcmpi(str.password,password1)==0) { found=1; outtextxy(10,140,"ACCESS GRANTED"); getch(); cleardevice(); while(ch!=6) { cleardevice(); outtextxy(10,20,"1. ADDITION OF RECORDS. "); outtextxy(10,40,"2. DATA OUTPUT OF ANY RECORD.\n"); outtextxy(10,60,"3. MODIFY ANY RECORD.\n"); outtextxy(10,80,"4. DELETE ANY CLASS RECORD.\n"); outtextxy(10,100,"5. PRODUCE LIST OF A CLASS.\n"); outtextxy(10,120,"6. EXIT.\n"); outtextxy(10,140,"ENTER YOUR CHOICE."); gotoxy(30,10); cin>>ch; switch(ch) { case 1: u=s_menu1(); uu=ss_menu1(u); switch(uu) { case 011: s1.yourdata1(); break; case 022: s1.yourdata2(); break; case 033: s1.yourdata3(); break; 142

Enrolment no.: 084627482


case 044: s1.yourdata4(); break; case 2: s1.yourdata5(); break; case 3: s1.yourdata6(); break; }; break; case 2: u=s_menu1(); uu=ss_menu1(u); switch(uu) { case 011: s1.showdata1(); break; case 022: s1.showdata2(); break; case 033: s1.showdata3(); break; case 044: s1.showdata4(); break; case 2: s1.showdata5(); break; case 3: s1.showdata6(); break; }; break; case 3: u=s_menu1(); uu=ss_menu1(u); switch(uu) { case 011: s1.moddata1(); break; case 022: s1.moddata2(); break; case 033: s1.moddata3(); break; case 044: s1.moddata4(); break; case 2: s1.moddata5(); break; case 3: s1.moddata6(); 143

Enrolment no.: 084627482


break; }; break; case 4: u=s_menu1(); uu=ss_menu1(u); switch(uu) { case 011:s1.deldata1(); break; case 022:s1.deldata2(); break; case 033:s1.deldata3(); break; case 044:s1.deldata4(); break; case 2:s1.deldata5(); break; case 3:s1.deldata6(); break; }; break; case 5: u=s_menu1(); uu=ss_menu1(u); switch(uu) { case 011:s1.plist1(); break; case 022:s1.plist2(); break; case 033:s1.plist3(); break; case 044:s1.plist4(); break; case 2:s1.plist5(); break; case 3:s1.plist6(); break; }; break; case 6: exit(0); };//switch }//while 144

Enrolment no.: 084627482


}//if2 else { outtextxy(10,180," PASSWORD IS INCORRECT"); getch(); exit(0); } }//if1 passfile.read((char *)&str,si); } if(found!=1) { outtextxy(10,180,"MAKE A USER I.D FIRST."); getch(); exit(0); } getch(); } void student5:: showdata1() { int roll_no; char nameof[30]; int size; int found; int classs; ifstream showfile1; clrscr(); showfile1.open("TEST1.TXT",ios::in); showfile1.seekg(0,ios::beg); cleardevice(); outtextxy(10,10,"Enter the class of the student5"); gotoxy(45,2); cin>>classs; outtextxy(10,30,"Enter the roll number of the student5:"); gotoxy(50,3); cin>>roll_no; size=sizeof(d1); showfile1.seekg(0,ios::beg); showfile1.read((char *)&s1,size); found=0; if(!showfile1) { 145

Enrolment no.: 084627482


outtextxy(10,200,"The file does not exist."); getch(); } else { while(!showfile1.eof()) { if(classs==s1.d1.class1) if(roll_no==s1.d1.roll) { clrscr(); s1.displaydata(); found=1; } showfile1.read((char *)&s1,size); } if(found!=1) outtextxy(10,200,"Unsuccessful search."); } getch(); showfile1.close(); } void student5:: showdata2() { int classs; int roll_no; char nameof[30]; int size; int found; ifstream showfile2; clrscr(); showfile2.open("TEST2.TXT",ios::in); showfile2.seekg(0,ios::beg); cleardevice(); outtextxy(10,10,"Enter the class of the student5"); gotoxy(45,2); cin>>classs; outtextxy(10,30,"Enter the roll number of the student5:"); gotoxy(50,3); cin>>roll_no; size=sizeof(d1); showfile2.seekg(0,ios::beg); 146

Enrolment no.: 084627482


showfile2.read((char *)&s1,size); found=0; if(!showfile2) {outtextxy(10,200,"The file does not exist."); getch(); } else { while(!showfile2.eof()) { if(classs==s1.d1.class1) if(roll_no==s1.d1.roll) { cleardevice(); s1.displaydata(); found=1; } showfile2.read((char *)&s1,size); } if(found!=1) outtextxy(10,200,"Unsuccessful search."); } getch(); showfile2.close(); } void student5:: showdata3() { int classs; int roll_no; char nameof[30]; int size; int found; ifstream showfile3; clrscr(); showfile3.open("TEST3.TXT",ios::in); showfile3.seekg(0,ios::beg); cleardevice(); outtextxy(10,10,"Enter the class of the student5"); gotoxy(45,2); cin>>classs; outtextxy(10,30,"Enter the roll number of the student5:"); gotoxy(50,3); 147

Enrolment no.: 084627482


cin>>roll_no; size=sizeof(d1); showfile3.seekg(0,ios::beg); showfile3.read((char *)&s1,size); found=0; if(!showfile3) {outtextxy(10,200,"The file does not exist."); getch(); } else { while(!showfile3.eof()) { if(classs==s1.d1.class1) if(roll_no==s1.d1.roll) { clrscr(); s1.displaydata(); found=1; } showfile3.read((char *)&s1,size); } if(found!=1) outtextxy(10,200,"Unsuccessful search."); } getch(); showfile3.close(); } void student5:: showdata4() { int classs; int roll_no; char nameof[30]; int size; int found; ifstream showfile4; clrscr(); showfile4.open("TEST4.TXT",ios::in); showfile4.seekg(0,ios::beg); cleardevice(); outtextxy(10,10,"Enter the class of the student5"); gotoxy(45,2); 148

Enrolment no.: 084627482


cin>>classs; outtextxy(10,30,"Enter the roll number of the student5:"); gotoxy(50,3); cin>>roll_no; size=sizeof(d1); showfile4.seekg(0,ios::beg); showfile4.read((char *)&s1,size); found=0; if(!showfile4) { outtextxy(10,200,"The file does not exist."); getch(); } else { while(!showfile4.eof()) { if(classs==s1.d1.class1) if(roll_no==s1.d1.roll) { clrscr(); s1.displaydata(); found=1; } showfile4.read((char *)&s1,size); } if(found!=1) outtextxy(10,200,"Unsuccessful search."); } getch(); showfile4.close(); } void student5:: showdata5() { int roll_no; char nameof[30]; int size; int found; int classs; ifstream showfile5; clrscr(); showfile5.open("TEST5.TXT",ios::in); 149

Enrolment no.: 084627482


showfile5.seekg(0,ios::beg); cleardevice(); outtextxy(10,10,"Enter the class of the student5"); gotoxy(45,2); cin>>classs; outtextxy(10,30,"Enter the roll number of the student5:"); gotoxy(50,3); cin>>roll_no; size=sizeof(d1); showfile5.seekg(0,ios::beg); showfile5.read((char *)&s1,size); found=0; if(!showfile5) {outtextxy(10,200,"The file does not exist."); getch(); } else { while(!showfile5.eof()) { if(classs==s1.d1.class1) if(roll_no==s1.d1.roll) { clrscr(); s1.displaydata(); found=1; } showfile5.read((char *)&s1,size); } if(found!=1) outtextxy(10,200,"Unsuccessful search."); getch(); } showfile5.close(); } void student5:: showdata6() { int roll_no; char nameof[30]; int size; int found; int classs; 150

Enrolment no.: 084627482


ifstream showfile6; clrscr(); showfile6.open("TEST6.TXT",ios::in); showfile6.seekg(0,ios::beg); cleardevice(); outtextxy(10,10,"Enter the class of the student5"); gotoxy(45,2); cin>>classs; outtextxy(10,30,"Enter the roll number of the student5:"); gotoxy(50,3); cin>>roll_no; size=sizeof(d1); showfile6.seekg(0,ios::beg); showfile6.read((char *)&s1,size); found=0; if(!showfile6) {outtextxy(10,200,"The file does not exist."); getch(); } else { while(!showfile6.eof()) { if(classs==s1.d1.class1) if(roll_no==s1.d1.roll) { clrscr(); s1.displaydata(); found=1; } showfile6.read((char *)&s1,size); } if(found!=1) outtextxy(10,200,"Unsuccessful search."); getch(); } showfile6.close(); } void student5::displaydata() { cleardevice(); outtextxy(10,10,"The data of the student5 is found."); 151

Enrolment no.: 084627482


outtextxy(10,30,"PRESS ANY KEY TO CONTINUE..."); getch(); cleardevice(); outtextxy(10,30,"Name of student5:"); gotoxy(45,3); cout<<d1.name; outtextxy(10,60,"Class of student5:"); gotoxy(45,5); cout<<d1.class1; outtextxy(10,90,"Roll number of the student5:"); gotoxy(45,7); cout<<d1.roll; getch(); cleardevice(); if(d1.class1<11) { outtextxy(10,30,"The marks in english are:"); gotoxy(45,3); cout<<d1.marks[0]; outtextxy(10,60,"The marks in hindi are:"); gotoxy(45,5); cout<<d1.marks[1]; outtextxy(10,90,"The marks in maths are:"); gotoxy(45,7); cout<<d1.marks[2]; outtextxy(10,120,"The marks in science are:"); gotoxy(45,9); cout<<d1.marks[3]; outtextxy(14,150,"The marks in social are:"); gotoxy(45,11); cout<<d1.marks[4]; if(d1.class1<9) outtextxy(10,180,"The marks in sanskrit are:"); gotoxy(45,13); cout<<d1.marks[5]; } else { outtextxy(10,30,"Your branch is :"); gotoxy(45,3); cout<<d1.branch; outtextxy(10,60,"Your marks in Physics:"); 152

Enrolment no.: 084627482


gotoxy(45,5); cout<<d1.marks[0]; outtextxy(10,90,"Your marks in Chemistry:"); gotoxy(45,7); cout<<d1.marks[1]; outtextxy(10,120,"Your marks in English:"); gotoxy(45,9); cout<<d1.marks[2]; if(strcmpi(d1.branch,"PCMC")==0) { outtextxy(10,150,"Your marks in Computer:"); gotoxy(45,11); cout<<d1.marks[3]; outtextxy(10,180,"Your marks in Maths:"); gotoxy(45,13); cout<<d1.marks[4]; } else if(strcmpi(d1.branch,"PCBI")==0) { outtextxy(10,150,"Your marks in biology:"); gotoxy(45,11); cout<<d1.marks[3]; outtextxy(10,180,"Your marks in I.P:"); gotoxy(45,13); cout<<d1.marks[4]; } else if(strcmpi(d1.branch,"PCMP")==0) { outtextxy(10,150,"Your marks in Physical Education:"); gotoxy(45,11); cout<<d1.marks[3]; outtextxy(10,180," Your marks in Maths:"); gotoxy(45,13); cout<<d1.marks[4]; } else if(strcmpi(d1.branch,"PCBP")==0) { outtextxy(10,150,"Your marks in Physical Education:"); cout<<d1.marks[3]; gotoxy(45,11); outtextxy(10,180,"Your marks in Biology:"); gotoxy(45,13); 153

Enrolment no.: 084627482


cout<<d1.marks[4]; } else if(strcmpi(d1.branch,"PCMB")==0) { outtextxy(10,150,"Your marks in Maths:"); gotoxy(45,11); cout<<d1.marks[3]; outtextxy(10,180,"Your marks in Biology:"); gotoxy(45,13); cout<<d1.marks[4]; } } outtextxy(10,210,"Your total is:"); gotoxy(45,15); cout<<d1.total; outtextxy(10,240,"Your percentage is:"); gotoxy(45,17); cout<<d1.percent; getch(); } void student5::moddata1() { int roll_num; int size; int classs; cleardevice(); outtextxy(10,30,"Enter your class:"); gotoxy(45,3); cin>>classs; outtextxy(10,60,"Enter the roll number of the student5:"); gotoxy(45,5); cin>>roll_num; fstream modfile1; cleardevice(); modfile1.open("TEST1.TXT",ios::in|ios::out); size=sizeof(d1); modfile1.seekg(0); modfile1.read((char *)&s1,size); int n=modfile1.tellg(); int found=0; if(!modfile1) {outtextxy(10,200,"The file does not exist."); 154

Enrolment no.: 084627482


getch(); } else { while(!modfile1.eof() && (!found)) { if(classs==s1.d1.class1) if(roll_num==s1.d1.roll) { clrscr(); modfile1.seekg(n-size); s1.mark_entry(); modfile1.write((char *)&s1,size); found=1; } modfile1.read((char *)&s1,size); } if(found!=1) outtextxy(10,200,"Unsuccessful search."); } modfile1.close(); } void student5::moddata2() { int roll_num; int size; int classs; cleardevice(); outtextxy(10,30,"Enter your class:"); gotoxy(45,3); cin>>classs; outtextxy(10,60,"Enter the roll number of the student5:"); gotoxy(45,5); cin>>roll_num; fstream modfile1; cleardevice(); modfile1.open("TEST2.TXT",ios::in|ios::out); size=sizeof(d1); modfile1.seekg(0); modfile1.read((char *)&s1,size); int n=modfile1.tellg(); int found=0; 155

Enrolment no.: 084627482


if(!modfile1) {outtextxy(10,200,"The file does not exist."); getch(); } else { while(!modfile1.eof() && (!found)) { if(classs==s1.d1.class1) if(roll_num==s1.d1.roll) { clrscr(); modfile1.seekg(n-size); s1.mark_entry(); modfile1.write((char *)&s1,size); found=1; } modfile1.read((char *)&s1,size); } if(found!=1) outtextxy(10,200,"Unsuccessful search."); } modfile1.close(); } void student5::moddata3() { int roll_num; int size; int classs; cleardevice(); outtextxy(10,30,"Enter your class:"); gotoxy(45,3); cin>>classs; outtextxy(10,60,"Enter the roll number of the student5:"); gotoxy(45,5); cin>>roll_num; cleardevice(); fstream modfile1; modfile1.open("TEST3.TXT",ios::in|ios::out); size=sizeof(d1); modfile1.seekg(0); modfile1.read((char *)&s1,size); 156

Enrolment no.: 084627482


int n=modfile1.tellg(); int found=0; if(!modfile1) {outtextxy(10,200,"The file does not exist."); getch(); } else { while(!modfile1.eof() && (!found)) { if(classs==s1.d1.class1) if(roll_num==s1.d1.roll) { clrscr(); modfile1.seekg(n-size); s1.mark_entry(); modfile1.write((char *)&s1,size); found=1; } modfile1.read((char *)&s1,size); } if(found!=1) outtextxy(10,200,"Unsuccessful search."); } modfile1.close(); } void student5::moddata4() { int roll_num; int size; int classs; cleardevice(); outtextxy(10,30,"Enter your class:"); gotoxy(45,3); cin>>classs; outtextxy(10,60,"Enter the roll number of the student5:"); gotoxy(45,5); cin>>roll_num; cleardevice(); fstream modfile1; modfile1.open("TEST4.TXT",ios::in|ios::out); size=sizeof(d1); 157

Enrolment no.: 084627482


modfile1.seekg(0); modfile1.read((char *)&s1,size); int n=modfile1.tellg(); int found=0; if(!modfile1) {outtextxy(10,200,"The file does not exist."); getch(); } else { while(!modfile1.eof() && (!found)) { if(classs==s1.d1.class1) if(roll_num==s1.d1.roll) { clrscr(); modfile1.seekg(n-size); s1.mark_entry(); modfile1.write((char *)&s1,size); found=1; } modfile1.read((char *)&s1,size); } if(found!=1) outtextxy(10,200,"Unsuccessful search."); } modfile1.close(); } void student5::moddata5() { int roll_num; int size; int classs; cleardevice(); outtextxy(10,30,"Enter your class:"); gotoxy(45,3); cin>>classs; outtextxy(10,60,"Enter the roll number of the student5:"); gotoxy(45,5); cin>>roll_num; cleardevice(); fstream modfile1; 158

Enrolment no.: 084627482


modfile1.open("TEST5.TXT",ios::in|ios::out); size=sizeof(d1); modfile1.seekg(0); modfile1.read((char *)&s1,size); int n=modfile1.tellg(); int found=0; if(!modfile1) {outtextxy(10,200,"The file does not exist."); getch(); } else { while(!modfile1.eof() && (!found)) { if(classs==s1.d1.class1) if(roll_num==s1.d1.roll) { clrscr(); modfile1.seekg(n-size); s1.mark_entry(); modfile1.write((char *)&s1,size); found=1; } modfile1.read((char *)&s1,size); } if(found!=1) outtextxy(10,200,"Unsuccessful search."); } modfile1.close(); } void student5::moddata6() { int roll_num; int size; int classs; cleardevice(); outtextxy(10,30,"Enter your class:"); gotoxy(45,3); cin>>classs; outtextxy(10,60,"Enter the roll number of the student5:"); gotoxy(45,5); cin>>roll_num; 159

Enrolment no.: 084627482


cleardevice(); fstream modfile1; modfile1.open("TEST6.TXT",ios::in|ios::out); size=sizeof(d1); modfile1.seekg(0); modfile1.read((char *)&s1,size); int n=modfile1.tellg(); int found=0; if(!modfile1) {outtextxy(10,200,"The file does not exist."); getch(); } else { while(!modfile1.eof() && (!found)) { if(classs==s1.d1.class1) if(roll_num==s1.d1.roll) { clrscr(); modfile1.seekg(n-size); s1.mark_entry(); modfile1.write((char *)&s1,size); found=1; } modfile1.read((char *)&s1,size); } if(found!=1) outtextxy(10,200,"Unsuccessful search."); } modfile1.close(); } void student5::deldata1() { int rolll,class10; cleardevice(); outtextxy(10,30,"Enter your class:"); gotoxy(45,3); cin>>class10; int size=sizeof(d1); fstream infile; fstream outfile; 160

Enrolment no.: 084627482


infile.open("TEST1.TXT",ios::in); outfile.open("temp.txt",ios::out); infile.seekg(0,ios::beg); infile.read((char *)&s1,size); while( !infile.eof() ) { if(class10!=s1.d1.class1) outfile.write((char *)&s1,size); infile.read((char *)&s1,size); } infile.close(); outfile.close(); remove("TEST1.TXT"); rename("temp.txt","TEST1.TXT"); } void student5::deldata2() { int rolll,class10; cleardevice(); outtextxy(10,30,"Enter your class:"); gotoxy(45,3); cin>>class10; int size=sizeof(d1); fstream infile; fstream outfile; infile.open("TEST2.TXT",ios::in); outfile.open("temp.txt",ios::out); infile.seekg(0,ios::beg); infile.read((char *)&s1,size); while( !infile.eof() ) { if(class10!=s1.d1.class1) outfile.write((char *)&s1,size); infile.read((char *)&s1,size); } infile.close(); outfile.close(); remove("TEST2.TXT"); rename("temp.txt","TEST2.TXT"); } void student5::deldata3() { 161

Enrolment no.: 084627482


int rolll,class10; cleardevice(); outtextxy(10,30,"Enter your class:"); gotoxy(45,3); cin>>class10; int size=sizeof(d1); fstream infile; fstream outfile; infile.open("TEST3.TXT",ios::in); outfile.open("temp.txt",ios::out); infile.seekg(0,ios::beg); infile.read((char *)&s1,size); while( !infile.eof() ) { if(class10!=s1.d1.class1) outfile.write((char *)&s1,size); infile.read((char *)&s1,size); } infile.close(); outfile.close(); remove("TEST3.TXT"); rename("temp.txt","TEST3.TXT"); } void student5::deldata4() { int rolll,class10; cleardevice(); outtextxy(10,30,"Enter your class:"); gotoxy(45,3); cin>>class10; int size=sizeof(d1); fstream infile; fstream outfile; infile.open("TEST4.TXT",ios::in); outfile.open("temp.txt",ios::out); infile.seekg(0,ios::beg); infile.read((char *)&s1,size); while( !infile.eof() ) { if(class10!=s1.d1.class1) outfile.write((char *)&s1,size); infile.read((char *)&s1,size); 162

Enrolment no.: 084627482


} infile.close(); outfile.close(); remove("TEST4.TXT"); rename("temp.txt","TEST4.TXT"); } void student5::deldata5() { int rolll,class10; cleardevice(); outtextxy(10,30,"Enter your class:"); gotoxy(45,3); cin>>class10; int size=sizeof(d1); fstream infile; fstream outfile; infile.open("TEST5.TXT",ios::in); outfile.open("temp.txt",ios::out); infile.seekg(0,ios::beg); infile.read((char *)&s1,size); while( !infile.eof() ) { if(class10!=s1.d1.class1) outfile.write((char *)&s1,size); infile.read((char *)&s1,size); } infile.close(); outfile.close(); remove("TEST5.TXT"); rename("temp.txt","TEST5.TXT"); } void student5::deldata6() { int rolll,class10; cleardevice(); outtextxy(10,30,"Enter your class:"); gotoxy(45,3); cin>>class10; int size=sizeof(d1); fstream infile; fstream outfile; infile.open("TEST6.TXT",ios::in); 163

Enrolment no.: 084627482


outfile.open("temp.txt",ios::out); infile.seekg(0,ios::beg); infile.read((char *)&s1,size); while( !infile.eof() ) { if(class10!=s1.d1.class1) outfile.write((char *)&s1,size); infile.read((char *)&s1,size); } infile.close(); outfile.close(); remove("TEST6.TXT"); rename("temp.txt","TEST6.TXT"); } void student5::plist1() { int roll_no; char nameof[30]; int size; int found; int classs; ifstream showfile1; cleardevice(); showfile1.open("TEST1.TXT",ios::in); showfile1.seekg(0,ios::beg); outtextxy(10,30,"Enter the class:"); gotoxy(45,3); cin>>classs; size=sizeof(d1); showfile1.seekg(0,ios::beg); showfile1.read((char *)&s1,size); found=0; if(!showfile1) { outtextxy(10,200,"The file does not exist."); getch(); } else while(!showfile1.eof()) { if(classs==d1.class1) { 164

Enrolment no.: 084627482


s1.displaydata(); found=1; outtextxy(10,280,"PRESS ANY KEY TO CONTINUE..."); getch(); } showfile1.read((char *)&s1,size); } if(found!=1) outtextxy(10,200," Unsuccessful search."); showfile1.close(); } void student5::plist2() { int roll_no; char nameof[30]; int size; int found; int classs; ifstream showfile1; cleardevice(); showfile1.open("TEST2.TXT",ios::in); showfile1.seekg(0,ios::beg); outtextxy(10,30,"Enter the class:"); gotoxy(45,3); cin>>classs; size=sizeof(d1); showfile1.seekg(0,ios::beg); showfile1.read((char *)&s1,size); found=0; if(!showfile1) {outtextxy(10,200,"The file does not exist."); getch(); } else while(!showfile1.eof()) { if(classs==d1.class1) { s1.displaydata(); found=1; outtextxy(10,280,"PRESS ANY KEY TO CONTINUE..."); getch(); 165

Enrolment no.: 084627482


} showfile1.read((char *)&s1,size); } if(found!=1) outtextxy(10,200," Unsuccessful search."); showfile1.close(); } void student5::plist3() { int roll_no; char nameof[30]; int size; int found; int classs; ifstream showfile1; cleardevice(); showfile1.open("TEST3.TXT",ios::in); showfile1.seekg(0,ios::beg); outtextxy(10,30,"Enter the class:"); gotoxy(45,3); cin>>classs; size=sizeof(d1); showfile1.seekg(0,ios::beg); showfile1.read((char *)&s1,size); found=0; if(!showfile1) {outtextxy(10,200,"The file does not exist."); getch(); } else while(!showfile1.eof()) { if(classs==d1.class1) { s1.displaydata(); found=1; outtextxy(10,280,"PRESS ANY KEY TO CONTINUE..."); getch(); } showfile1.read((char *)&s1,size); } if(found!=1) 166

Enrolment no.: 084627482


outtextxy(10,200," Unsuccessful search."); showfile1.close(); } void student5::plist4() { int roll_no; char nameof[30]; int size; int found; int classs; ifstream showfile1; cleardevice(); showfile1.open("TEST4.TXT",ios::in); showfile1.seekg(0,ios::beg); outtextxy(10,30,"Enter the class:"); gotoxy(45,3); cin>>classs; size=sizeof(d1); showfile1.seekg(0,ios::beg); showfile1.read((char *)&s1,size); found=0; if(!showfile1) {outtextxy(10,200,"The file does not exist."); getch(); } else while(!showfile1.eof()) { if(classs==d1.class1) { s1.displaydata(); found=1; outtextxy(10,280,"PRESS ANY KEY TO CONTINUE..."); getch(); } showfile1.read((char *)&s1,size); } if(found!=1) outtextxy(10,200," Unsuccessful search."); showfile1.close(); } void student5::plist5() 167

Enrolment no.: 084627482


{ int roll_no; char nameof[30]; int size; int found; int classs; ifstream showfile1; cleardevice(); showfile1.open("TEST5.TXT",ios::in); showfile1.seekg(0,ios::beg); outtextxy(10,30,"Enter the class:"); gotoxy(45,3); cin>>classs; size=sizeof(d1); showfile1.seekg(0,ios::beg); showfile1.read((char *)&s1,size); found=0; if(!showfile1) {outtextxy(10,200,"The file does not exist."); getch(); } else while(!showfile1.eof()) { if(classs==d1.class1) { s1.displaydata(); found=1; outtextxy(10,280,"PRESS ANY KEY TO CONTINUE..."); getch(); } showfile1.read((char *)&s1,size); } if(found!=1) outtextxy(10,200," Unsuccessful search."); showfile1.close(); } void student5::plist6() { int roll_no; char nameof[30]; int size; 168

Enrolment no.: 084627482


int found; int classs; ifstream showfile1; cleardevice(); showfile1.open("TEST6.TXT",ios::in); showfile1.seekg(0,ios::beg); outtextxy(10,30,"Enter the class:"); gotoxy(45,3); cin>>classs; size=sizeof(d1); showfile1.seekg(0,ios::beg); showfile1.read((char *)&s1,size); found=0; if(!showfile1) {outtextxy(10,200,"The file does not exist."); getch(); } else while(!showfile1.eof()) { if(classs==d1.class1) { s1.displaydata(); found=1; outtextxy(10,280,"PRESS ANY KEY TO CONTINUE..."); getch(); } showfile1.read((char *)&s1,size); } if(found!=1) outtextxy(10,200," Unsuccessful search."); showfile1.close(); } /************************************************ // REPORT CARD MANAGEMENT ************************************************/ // CLASS USED IN PROJECT class student4 { int rollno; char name[50]; 169

Enrolment no.: 084627482


int p_marks,c_marks,m_marks,e_marks,cs_marks; float per; char grade; int std; void calculate() { per=(p_marks+c_marks+m_marks+e_marks+cs_marks)/5.0; if(per>=60) grade='A'; else if(per>=50 && per<60) grade='B'; else if(per>=33 && per<50) grade='C'; else grade='F'; } public: void getdata() { cout<<"\nEnter The roll number of student "; cin>>rollno; cout<<"\n\nEnter The Name of student "; gets(name); cout<<"\nEnter The marks in physics out of 100 : "; cin>>p_marks; cout<<"\nEnter The marks in chemistry out of 100 : "; cin>>c_marks; cout<<"\nEnter The marks in maths out of 100 : "; cin>>m_marks; cout<<"\nEnter The marks in english out of 100 : "; cin>>e_marks; cout<<"\nEnter The marks in computer science out of 100 : "; cin>>cs_marks; calculate(); } void showdata() { cout<<"\nRoll number of student : "<<rollno; cout<<"\nName of student : "<<name; cout<<"\nMarks in Physics : "<<p_marks; cout<<"\nMarks in Chemistry : "<<c_marks; cout<<"\nMarks in Maths : "<<m_marks; 170

Enrolment no.: 084627482


cout<<"\nMarks in English : "<<e_marks; cout<<"\nMarks in Computer Science :"<<cs_marks; cout<<"\nPercentage of student is :"<<setprecision(2)<<per; cout<<"\nGrade of student is :"<<grade; } void show_tabular() { cout<<rollno<<setw(12)<<name<<setw(10)<<p_marks<<setw(3)<<c_ma rks<<setw(3)<<m_marks<<setw(3)<< e_marks<<setw(3)<<cs_marks<<setw(6)<<setprecision(3)<<per<<" "<<grade<<endl; } int retrollno() { return rollno; } }; //class ends here // global declaration for stream object, object // fstream fp; student4 st4; // function to write in file void write_student4() { fp.open("student4.dat",ios::out|ios::app); st4.getdata(); fp.write((char*)&st4,sizeof(student4)); fp.close(); cout<<"\n\nstudent record Has Been Created "; getch(); } // function to read all records from file void display_all() { clrscr(); cout<<"\n\n\n\t\tDISPLAY ALL RECORD !!!\n\n"; fp.open("student4.dat",ios::in); while(fp.read((char*)&st4,sizeof(student4))) { st4.showdata();

171

Enrolment no.: 084627482

cout<<"\n\n====================================\n"; getch(); } fp.close(); getch(); } // function to read specific record from file void display_sp(int n) { int flag=0; fp.open("student4.dat",ios::in); while(fp.read((char*)&st4,sizeof(student4))) { if(st4.retrollno()==n) { clrscr(); st4.showdata(); flag=1; } } fp.close(); if(flag==0) cout<<"\n\nrecord not exist"; getch(); } // function to modify record of file void modify_student4() { int no,found=0; clrscr(); cout<<"\n\n\tTo Modify "; cout<<"\n\n\tPlease Enter The roll number of student"; cin>>no; fp.open("student2.dat",ios::in|ios::out); while(fp.read((char*)&st4,sizeof(student4)) && found==0) { if(st4.retrollno()==no) { st4.showdata();

172

Enrolment no.: 084627482


cout<<"\nPlease Enter The New Details of student"<<endl; st4.getdata(); int pos=-1*sizeof(st4); fp.seekp(pos,ios::cur); fp.write((char*)&st4,sizeof(student4)); cout<<"\n\n\t Record Updated"; found=1; } } fp.close(); if(found==0) cout<<"\n\n Record Not Found "; getch(); } // function to delete record of file void delete_student4() { int no; clrscr(); cout<<"\n\n\n\tDelete Record"; cout<<"\n\nPlease Enter The roll number of student You Want To Delete"; cin>>no; fp.open("student4.dat",ios::in|ios::out); fstream fp2; fp2.open("Temp.dat",ios::out); fp.seekg(0,ios::beg); while(fp.read((char*)&st4,sizeof(student4))) { if(st4.retrollno()!=no) { fp2.write((char*)&st4,sizeof(student4)); } } fp2.close(); fp.close(); remove("student4.dat"); rename("Temp.dat","student4.dat"); cout<<"\n\n\tRecord Deleted .."; getch(); } 173

Enrolment no.: 084627482


// function to display all students grade report

void class_result() { clrscr(); fp.open("student4.dat",ios::in); if(!fp) { cout<<"ERROR!!! FILE COULD NOT BE OPEN\n\n\n Go To Entry Menu to create File"; cout<<"\n\n\n Program is closing ...."; getch(); exit(0); } cout<<"\n\n\t\tALL STUDENTS RESULT \n\n"; cout<<"========================================= ===========\n"; cout<<"Roll No. Name P C M E CS %age Grade\n"; cout<<"========================================= ===========\n"; while(fp.read((char*)&st4,sizeof(student4))) { st4.show_tabular(); } fp.close(); getch(); } // function to display result menu void result() { int ans,rno; char ch; clrscr(); cout<<"\n\n RESULT MENU"; cout<<"\n\n 1. Class Result "; cout<<"\n\n 2. Student Report Card "; cout<<"\n\n 3.Back to Main Menu "; cout<<"\n\n\nEnter Choice (1/2)? "; cin>>ans; switch(ans) 174

Enrolment no.: 084627482


{ case 1 : class_result(); break; case 2 : { do{ clrscr(); char ans; cout<<"\n\nEnter Roll Number Of Student : "; cin>>rno; display_sp(rno); cout<<"\n\nDo you want to See More Result (y/n)?"; cin>>ans; }while(ans=='y'||ans=='Y'); break; } case 3: break; default: cout<<"\a"; } } // ENTRY / EDIT MENU FUNCTION void entry_menu() { clrscr(); char ch2; cout<<"\n\n\n\t ENTRY MENU"; cout<<"\n\n\t 1.CREATE STUDENT RECORD"; cout<<"\n\n\t 2.DISPLAY ALL STUDENTS RECORDS"; cout<<"\n\n\t 3.SEARCH STUDENT RECORD "; cout<<"\n\n\t 4.MODIFY STUDENT RECORD"; cout<<"\n\n\t 5.DELETE STUDENT RECORD"; cout<<"\n\n\t 6.BACK TO MAIN MENU"; cout<<"\n\n\t Please Enter Your Choice (1-6) "; ch2=getche(); switch(ch2) { case '1': clrscr(); 175

Enrolment no.: 084627482


write_student4(); break; case '2': display_all(); break; case '3': int num; clrscr(); cout<<"\n\n\tPlease Enter The roll number "; cin>>num; display_sp(num); break; case '4': modify_student4(); break; case '5': delete_student4(); break; case '6': break; default: cout<<"\a"; entry_menu(); } } // THE MAIN FUNCTION OF PROGRAM void School_Management_System::Report_Card_Management() { char ch; do { clrscr(); cout<<" MAIN MENU"; cout<<" 1. RESULT MENU"; cout<<" 2. ENTRY/EDIT MENU"; cout<<" 3. EXIT"; cout<<" Please Select Your Option (1-3) "; ch=getche(); switch(ch) { case '1': clrscr(); 176

Enrolment no.: 084627482


result(); break; case '2': entry_menu(); break; case '3': break; } }while(ch!='3'); } /******************************************* //MAIN MENU OF SCHOOL MANAGEMENT SYSTEM *******************************************/ void School_Management_System::menu() { cout<<"\n\n===================================\n\n"; cout<<"\n***************************************\n"; cout<<"\n\n 1 -> Admission_Management \n "; cout<<"\n\n 2 -> Student_Management \n "; cout<<"\n\n 3 -> Staff_Management\n "; cout<<"\n\n 4 -> Library_Management \n "; cout<<"\n\n 5 -> Fees_Management \n "; cout<<"\n\n 6 -> Examination_Management \n "; cout<<"\n\n 6 -> Report_Card_Management \n "; cout<<"\n\n 7 -> Quit \n "; cout<<"\n****************************************\n"; cout<<"\n\n======================================\n "; cout<<"\n\n ENTER YOUR CHOICE \n "; } void main_menu() { School_Management_System sms; int ch; sms.menu(); cin >>ch; cout<<"enter code "<<ch<<endl; 177

Enrolment no.: 084627482


while(ch != '8') { switch(ch) { case 1: sms.Admission_Management(); break; case 2: sms.Student_Management(); break; case 3: sms.Staff_Management(); break; case 4: sms.Library_Management(); break; case 5: sms.Fees_Management(); break; case 6: sms.Examination_Management(); break; case 7: sms.Report_Card_Management(); break; case 8: exit(0); break; } } }

void main() { clrscr(); main_menu(); getch(); }

178

Enrolment no.: 084627482

CHAPTER - 10 INPUT AND OUTPUT SCREEN


Input Screen of Admission Management

179

Enrolment no.: 084627482

180

Enrolment no.: 084627482

Output Screen Of Admission Management

181

Enrolment no.: 084627482

Input Screen of Student Management

182

Enrolment no.: 084627482

Input Screen of Student Information

183

Enrolment no.: 084627482

Input Screen to enter Student Information

184

Enrolment no.: 084627482

Input Screen To Modify or Remove Student Information

185

Enrolment no.: 084627482

186

Enrolment no.: 084627482


\

Input Screen of Staff Management

187

Enrolment no.: 084627482

Input Screen Of Teacher Information

188

Enrolment no.: 084627482

Input Screen of Officers Information

189

Enrolment no.: 084627482

Input Sreen Of Typist Information

190

Enrolment no.: 084627482

191

Enrolment no.: 084627482

Input Screen of Library Management

192

Enrolment no.: 084627482

Input Screen Of Book Issue

193

Enrolment no.: 084627482

Input Screen of Fees Management

194

Enrolment no.: 084627482

Input Screen Of Report Card Management

195

Enrolment no.: 084627482

Input Screen Of Result information

196

Enrolment no.: 084627482

CHAPTERR 11 TESTING
11.1 TESTING STRATEGIES

System testing is the expensive and time consuming process. There are two strategies for testing software that we use for testing our system. They are: 1. Code Testing 2. Specification Testing In Code testing, we developed those cases to execute every instructions and path in the program. In Specification testing, we examined the program specification and the wrote test data to determine how the program operates under specified condition. The basic levels are unit testing, integration testing, system testing, and acceptance testing. Before actually implementing the new system into operation, a test run of the system is done for removing the bugs, if any. It is an important phase of a successful system. After codifying the whole programs of the system, a test plan should be developed and run on a given set of test data. The output of the
197

Enrolment no.: 084627482


test run should match the expected results. Sometimes, system testing is considered a part of implementation process. Using the test data following test run are carried out: 1. Program test 2. System test Program test: When the programs have been coded, compiled and brought to working conditions, they must be individually tested with the prepared test data. Any undesirable happening must be noted and debugged (error corrections). System Test: After carrying out the program test for each of the programs of the system and errors removed, then system test is done. At this stage the test is done on actual data. The complete system is executed on the actual data. At each stage of the execution, the results or output of the system is analysed. During the result analysis, it may be found that the outputs are not matching the expected output of the system. In such case, the errors in the particular programs are identified and are fixed and further tested for the expected output. When it is ensured that the system is running error-free, the users are called with their own actual data so that the system could be shown running as per their requirements.

11.2 Test Case Design

198

Enrolment no.: 084627482

11.2.1 Unit Testing


Unit testing is the lowest level of testing performed during software development. Individual units of software are tested in isolation from other parts of the program. Unit testing typically aims to achieve 100% decision coverage of the code within a unit (although other coverage measures can also be used). Conscientious unit testing will detect many problems at a stage of the development where they can be corrected economically. For software developed in C++, the class is the smallest unit which it is practical to unit test. A well designed class will provide an abstraction, with implementation details hidden within the class. Objects of such classes can be difficult to thoroughly unit test. Unit testing deals with testing a unit as a whole. This would test the interaction of many functions but confine the test within one unit. The exact scope of a unit is left to interpretation. Supporting test code, sometimes called scaffolding, may be necessary to support an individual test. This type of testing is driven by the architecture and implementation teams. This focus is also called black-box testing because only the details of the interface are visible to the test. Limits that are global to a unit are tested here.

199

Enrolment no.: 084627482


Benefits The goal of unit testing is to isolate each part of the program and show that the individual parts are correct. A unit test provides a strict, written contract that the piece of code must satisfy. As a result, it affords several benefits. Unit tests find problems early in the development cycle.

Simplifies integration
Unit testing may reduce uncertainty in the units themselves and can be used in a bottom-up testing style approach. By testing the parts of a program first and then testing the sum of its parts, integration testing becomes much easier. Unit testing limitations Testing cannot be expected to catch every error in the program: it is impossible to evaluate every execution path in all but the most trivial programs. The same is true for unit testing. Additionally, unit testing by definition only tests the functionality of the units themselves. Therefore, it will not catch integration errors or broader system-level errors (such as functions performed across multiple units, or nonfunctional test areas such as performance). Unit testing should be done in conjunction with other software testing activities. Like all forms of software testing, unit tests can only show the presence of errors; they cannot show the absence of errors.

200

Enrolment no.: 084627482


11.2.2 Integration Testing Integration testing, also known as integration and testing (I&T), is a software development process which program units are combined and tested as groups in multiple ways. In this context, a unit is defined as the smallest testable part of an application. Integration testing can expose problems with the interfaces among program components before trouble occurs in real-world program execution. Integration testing is a component of Extreme Programming (XP), a pragmatic method of software development that takes a meticulous approach to building a product by means of continual testing and revision. There are two major ways of carrying out an integration test, called the bottom-up method and the top-down method.

Bottom-up integration testing begins with unit testing, followed by tests of of progressively higher-level combinations of units called modules or builds.

In top-down integration testing, the highest-level modules are tested first and progressively lower-level modules are tested after that. In a comprehensive software development environment, bottom-up testing is usually done first, followed by top-down testing.

11.2.3 System Testing

201

Enrolment no.: 084627482


Here the entire software system is tested. The reference for this process is the requirements document, and the goal is to see if the software meets its requirements. 11.3 Unit Test Outcomes There are three ways to verify that a unit test has passed:

Use one or more Assert statements to validate specific outcomes. Verify that no exception was thrown. It is still advisable to use one or more Assert statements.

Verify that a particular exception is thrown.

11.4 DEBUGGING The compiler can detect syntax errors but it is unable to detect run time errors, which result in incorrect output. To trace these types of errors in the program the debugging has to be done by the programmer. Debugging is a cycle of detection, location, repair and test. Debugging is a hypothesis testing process. When bug is detected, the tester must form a hypothesis about the cause and location of the bug. Future examination of the
202

Enrolment no.: 084627482


execution of the program will take place to confirm the hypothesis. If the hypothesis is demonstrated to be incorrect, a new hypothesis must be formed.

CHAPTER - 12 IMPLEMENTATION OF SECURITY


It is critical in system development. The analyst has a responsibility to design a workable security system to protect the system from damage, error, and unauthorized access. Types of Issues related to security : 1. System Security 2. System Integrity : Proper functioning of hardware & programs.
203

Enrolment no.: 084627482


3. System Privacy. 4. System Confidentiality. Some threats to system security : 1. Errors & Omissions 2. Disgruntled and dishonest employees 3. Fire 4. External attack. Security Measures : 1. User need to be authenticated . 2. An encryption mechanism is used to ensure better scurity.

CHAPTER - 13 VALIDATION, IMPLEMENTATION AND MAINTENANCE

13.1 VALIDATION
The only validation in this project is that the registration number of the each student is unique i.e, it should not be same.

13.2 IMPLEMENTATION

204

Enrolment no.: 084627482


This is the important phase of the System Development Life Cycle,where the actual implementation of the designed system occurs. Implementatin is a process that includes all those activities that take place to convert an old system to a new system. There are three types of implementation: 1. Implementation of computer system to replace a manual system : The problems encountered are converting files, training users, creating accurate files, and verifying printouts for integrity. 2. Implementation of new computer system to replace an existing one : This is usally difficult conversion. If not properly planned there can be many problems. Some large computer Systems have taken as long as a year to convert. Implementation of modified application to replace an existing one using the same computer. This type of conversion is relatively easy to handle provided there are no major changes in the file. Implementation uses the design document to produce code. Demonstration that the program satisfies its specifications validates the code. Typically, sample runs of the program demonstrating the behaviour for expected data values and boundary values are required

205

Enrolment no.: 084627482


modules and works toward the main program. Test harness is used to test individual modules. The main module constitutes the final test harness.

13.3 MAINTENANCE
Once the software is delivered and deployed, then maintenance phase starts. Software requires maintenance because there are some residual errors remaining in the system that must be removed as they discovered. Maintenance involves understanding the existing software (code and related documents ), understanding the effects of change, making the changes, testing the new changes, and retesting the old parts that were not changed. The complexity of the maintenance task makes maintenance a most costly activity in the life of the software product. It is believed that almost all the software yhat is developed has residual errors, or bugs, in them. These errors needs to be removed when discovered that leads to the software change. This is called corrective maintenance. Corrective maintenance means repairing, processing or performance failures or making alterations because of previously ill defined problems. Software undergoes change frequently even without bugs because the software must be ugraded and enhanced to include more features and provide more services. This also requires modification of the software.

206

Enrolment no.: 084627482

CHAPTER 14 LIMITATIONS
Education system forms the backbone of every nation. The success of this system lies in correct knowledge dissemination process blended with smooth and efficient functioning of management system. Technology at schools can play a very crucial role in streamlining the whole system of education. Major Limitations And Challenges In Front Of The Schools to implement a School Management Software. 1. Mental blocks 2. Schools are doing well without IT
207

Enrolment no.: 084627482


3. It adds a lot of cost on school. 4. Our teachers and other users are not techno savvy. 5. Not all our parents are IT enabled so what's the point. 6. Who will manage the data.

CHAPTER - 15 FUTURE AND SCOPE APPLICATIONS


15.1 Future Extention
Since nothing is perfect in this world.There is always a scope of inprovement. Present System has some drawbacks that can be removed in the next version. The following may be incorporated as extention : 1. Personal mailing and chatting. 2. Fees can be deposited online by credit card also. 3. On-line Test.

15.2 Scope

208

Enrolment no.: 084627482


The main scope of the School Management System is to ensure the systematic efficiency in school administration and the delivery of service mechanism. This project will be useful for any schools and colleges with slightly modification. It may be used for English medium as well as Hindi medium school. Project is flexible i.e, any change / modification in database may be perform easily. Also this project could be made web enabled.

CONCLUSION
School Management Systems are being identified as an appropriate method for managing information in schools. In this project, we developed an automated school management system that facilitates the various activities taking place at schools. A package can be only developed successfuly if the developer has a widespread undertaking about the nature of the existing problems. Obviosly, developer should try to tackle each and every problem encountered regarding implementation of the new system. It is envident that most of the time it is not possible to make such package that can solve the entire problems some bugs may always be there. This is because of the nature of the problem and designed of the package.

209

Enrolment no.: 084627482


School Management System is comletely user-friendly system, which can be operated by the person having no computer background or very less computer knowledge. It will be unjustified if it claimed that this project is perfect in all respects. Therefore project has some limitation and needed to provide perfection to this projects.

210