You are on page 1of 120

University Management System

Introduction
I begin with a brief introduction about this project and the different stages of the design
and the development of UNIVERSITY MANAGEMENT SYSTEM. Before detailed discussion,
first of all I would like to give an overall idea about this project.

TITLE OF THE PROJECT

“UNIVERSITY MANAGEMENT SYSTEM”

I developed my project on UNIVERSITY MANGEMNET SYSTEM, because University


System is one of the most common and the first application implemented in any higher
educational organization.

In University a large amount of data is processed and the results are used in running an
organization. The University management system project maintains the list of colleges and their
different streams. It also maintains the examination and the result department with a proper
menu system.

Why Computerized University


Management System?
Man is a social animal and has endless wants and needs. The days of the primitive man
are gone. Gone too are the days when survival meant just food, clothing and shelter.
Technology has changed the ways we live. The invention of currency has ushered in a new
breed of humans. Most business transactions are clinched by fiscal exchanges.

To sustain them, people put in hours of work .The average adult spends approximately
one-third of his or her life working. Business is booming. A considerable portion of the
expenditure of the business is on the compensation given to its employees. Therefore it
becomes necessary for an organization to maintain perfect and accurate record. For this we
need a computerized university management system.

Perfect ness is the key to work. It is very important from the point of view of the
organization as well as for the student that the record is maintained about the colleges and
students error free. So, speedier and accurate maintenance of the university becomes a matter
of importance. Automation does this to a large extent.

1
University Management System

As we know that today is the world of computers and it has entered in the each and
every phase of everyday life. Computer plays an important role in day-to-day work. Hence
today is the day of computers.

The use of computers in the field of management of information is well known to us .The
use of computers in the university management system provides following benefits over manual
system

1.) Availability
It gives us that information which was not provided by the manual system.

2.) Timeliness
Provides information (output) in less time.

3.) Accuracy

Using computer, we will get the information more accurate rather than the
manually calculated and manual records information.

4.) Completeness
Computer never gives us incomplete information. We will always get the complete and
full information using the computer.

5.) Meaningful and action oriented


Whatever the work we will provide the computer to do, computer works on only that
particular work. It means computer always do a meaningful and action oriented work for the
user.

6.) Commensurate
Whatever the format (output) is designed for a particular program by the computer
should be in such a manner that co-relates with the format of other information groups.

“A University Management System handles all information necessary for handling a


college and student.” This system must develop the paperwork necessary college and the
students. The system must maintains files on individual college and student record, provide up
to date the information, print outputs on information related to the University.

2
University Management System

In addition, the system must have checks & controls that prevent fraudulent use of
payroll funds.

* The University management system processes data related with activities of students
and colleges. So university management system is very important for a university. Needless to
say, careful planning and suitable backup measures are absolutely necessary when automating
these activities. During the selection process, it is worthwhile to review our present universities
policies.
Improve benefits over before talking the whole questions of automating the process.

A good university management system will process input data faster and reduce clerical
time, while:

 Assuring management control in making certain that output is correct.


 Generally useful reports at little or no incremental cost.
 Project is handled with oops concept.

Main Goal of The Project


The main goal of the project is to obtain the complete and correct information. Because
University management department of an organization maintains a record of:
 The Colleges
 The Students
 The Examination & Result

To do that, the department:


 Prepares the record for each department, showing the total number of student and
colleges.
 Keeps track of any modification necessary related to the students and colleges.
 Produces regular reports for the Organization giving the total information required.

Management needs to know details like department – number of colleges, their streams,
the degree courses run by them and location. Management also needs to know the same
information about the students.

Objectives of the Project

3
University Management System

My project “UNIVERSITY MANAGEMNT SYSTEM” maintains detailed records of all the


Colleges and Students as well as and the Examination and the Result department.

The University data file should contain following information:

Details of College information


In this section the project keeps the record of college id, college name, college location, college
running the stream and the degree the college is running and maintains the information in
college.dat data.

Details of Student formation


In this section the project keeps the record of student id, student name, student address,
father’s name, contact number, degree stream, std code.

Project Category
Category of this project will be “Object Oriented Programming System”. Object oriented
technologies loads to reuse leads to faster software development and higher quality programs.

Drawbacks with Existing System


 Time Consuming.
 Less Data Security.
 More paper works are to be done.
 No view generation facility.
 No report generation.

Tools/Platforms and Languages Used


Hardware Configuration
Processor: 845 Intel Processor
Main Memory: 128 MB RAM
HDD: 20 GB
FDD: 1.44 MB

4
University Management System

SVGA Color monitor


Logitech mouse
105 keys keyboard

Software
Operating System: WINDOWS 98 SE
Programming Language: C++
Documentation: MS-WORD 2000
Backup media: Hard Disk Backup

Why using C++


Developments in software technology continue to be dynamic. New tools and techniques
are announced in quick succession. This has forced the software engineers and industry to
continuously look for new approaches to software design and development, and they are
becoming more and more critical in view of the increasing complexity of software systems as
well as the highly competitive nature of the industry.

These rapid advances appear to have created a situation of crisis within the industry.
The following issues need to be addressed to face this crisis:

 How to represent real-life entities of problems in system design?


 How to design systems with open interfaces?
 How to ensure reusability and extensibility of modules?
 How to develop modules that are tolerant to any changes in future?
 How to improve software productivity and decrease software cost?
 How to improve the quality of service?
 How to manage time schedules?
 How to industrialize the software development process?

Many software products are either not finished, or not used, or else are delivered
with major errors.

To reduce such errors software technology evolution gradually increases. Since,


The invention of the computer, many programming approaches has been tried. These
include techniques such as modular programming and structured programming.

5
University Management System

Procedure-Oriented Programming
Conventional programming, using high-level languages such as COBOL, FORTRAN
and C, is commonly known as procedure oriented programming (POP).

Problems with POP


 In the procedure-oriented approach, the problem is viewed as a sequence of things to be
done such as reading, calculating and printing.
 In a large program it is very difficult to identify what data is used by which function.
 Another serious drawback with the procedural approach is that it does not model real
world problems very well. This is because functions are action oriented and do not really
corresponds to the elements of the problem

Object–Oriented Programming
The major motivating factor in the invention of object-oriented approach is to
remove some of the flaws encountered in the procedural approach. OOP treats data as a
critical element in the program development and does not allow it to flow freely around the
system. It ties data more closely to the functions that operate on it and protects it from
accidental modification from outside functions.

Object – oriented programming is the most recent concept among programming


paradigms. We define “object-oriented programming as an approach that provides a way of
modularize problems by creating partitioned memory area for both data and functions that
can be used as templates for creating copies of such modules on demand.

Characteristics of OOP languages


1. Object: Objects are entities, which can exist individually. It has its own properties
and methods, where properties define the outlook of the object and methods define
their procedures.

2. Class: It is a template used to define different objects of same type.

3. Encapsulation: The data and the methods, which operate on the data, are
combined and placed in a group, this phenomenon is known as encapsulation, and
the group is known as the object.

6
University Management System

4. Abstraction: It means hiding of the data of one object of a class from another
object of the same class.

5. Inheritance: Inheritance is the property by which an existing class can be used to


create new classes, by deriving all the properties and methods of the old class to the
new class and also adding new properties /methods in the new class. The old class is
known as a base class or super class. The new class is known as derived class or sub
class.

6. Polymorphism: Polymorphism means “One interface and multiple methods” i.e.


one interface can be used to provide different functionalities.

There are two kinds of polymorphism:

a) Compile time polymorphism: It is also known as early binding, as the


interfaces are bind with their methods at compile time. It is accomplished
using function overloading and operator overloading.
b) Run time polymorphism: It is also known as late binding. In run time
polymorphism the interface and its method bind at the time of execution. It is
accomplished using virtual function.

7. Multiple Inheritance: When two or more classes are used to define a single class,
then it is known as multiple inheritance.

Benefits of OOP
Object oriented contributes to solution of many problems associated with the
development quality of software products. The new technology promises greater programmer
productivity, better quality of software and lesser maintenance cost. The principal advantages
are:
 Through inheritance, we can eliminate redundant code and extend the use of
existing classes.
 We can build programs from the standard working modules that communicate
with one another rather than having to start writing the code from scratch.
This leads to saving of development time and higher productivity.
 The principle of data hiding helps the programmer to build secure programs
that cannot be invaded by code in other parts of the program

7
University Management System

 It is possible to have map objects in the problem domain to those in the


program.
 It is easy to partition the work in a project based on objects.
 The data centered design approach enables us to capture more details of a
model in implemental form,
 Object-oriented systems can be easily upgraded from small to large systems.
 Message passing techniques for communication between objects make the
interface descriptions with external systems much simpler.
Software complexity can be easily managed.

Systems Analysis and Design


VIS A VIS USER REQUIREMENT

System Analysis is the term used to describe the process of collecting and analyzing
facts in respect of an existing operation of a situation so that an effective computerized system
may be designed and implemented if proved feasible.

System Analysis can be viewed as the most recent and perhaps the most comprehensive
techniques for solving computer problems.

System Analysis also embraces system design, which is an activity concerned with the
design of a computerized application based on facts disclosed during the analysis stage.

System analysis basically is an approach towards viewing process, activities and


complex problems. Thus specifically:

 It offers a method for greater understanding of the complex structures.


 It is a tool for trade off between functional requirement of a subsystem and its
immediately related sub-system.
 It helps in understanding and comparing functional impacts of sub-systems to the
total systems.
 It helps in discovering procedures and methodology for designing systems where
sub-systems may have apparently conflicting objectives.
 Finally, it helps in placing each sub-system in the proper prospective and context
so that the system as a whole may achieve its objectives with minimum available
resources. It thus creates synchronization between the system and objectives.

8
University Management System

DATA

SYSTEM CREATION OF
ALTERNATIVES

FEASIBILITY
STUDY

Requirement Gathering

Requirement gathering refers to the collection of information pertinent to system project.


To get information, we read books or reports; we go through company, collected forms from the
company for later analysis and interview people. Interviewing is an important skill and we apply
to the company manager, the teller and even the customers.

As information is collected we documented the important aspects so it can be referred to


later on for this purpose we used charts and tables.

The principle methods of obtaining facts include:

1. Interviewing personnel.
2. Observing activities.
3. Use of questionnaires or by inspections.

In general, the stages of investments are as follows:


1. Define the problem.
2. Plan the project.
3. Record the facts.
4. Verify the records.

A part from collecting facts as indicated above, there are other specific points to be considered
in a system analysis, as follows:
a) Collect specimen of all documents used in the system.
b) From the documents collected prepare.

9
University Management System

i. Document analysis from input.


ii. Document analysis from output.
iii. File analysis from.
iv. Output analysis chart.

Creation of Alternatives
Ones we get the clear idea of the problem, we begin to create some solutions usually
begin to form while the initial research is going on. Then after completing the research, we
choose the most promising alternatives and develop them.

In order to create alternatives, we have a broad background and familiar with the many
different types of equipment that can be applied to the problem and familiar with the various
types of procedures that can be used. From this background, we can develop an alternative
similar to one that other company is using or can create special or unique solutions to the
company problem.

It is important to realize that the solutions at this stage are not developed in detail. The
procedures develop here are not specific. Although a general logic flow is created for each
alternative, specific steps will be determined during the system design phase.

After creation of alternatives completed, now we are able to proceed with the Context
Analysis Diagram and further Data Flow Diagram for our system.

Data Flow Diagrams

10
University Management System

11
University Management System

12
University Management System

13
University Management System

14
University Management System

The flowchart of this project is as follows

START

1. ENTRY
2. DISPLAY
3. EDIT
4. ENQUIRY
5. EXIT

Y
IS ENTRY
CH=1?
15 SECTION
University Management System

N
Y DISPLAY
IS SECTION
CH=1?
N
Y
ENQUIRY
IS
CH=1?
N
Y MODIFY
IS SECTION
CH=1?
N

Y PERFOR-
IS MANCE
CH=1?

STOP

E-R Diagram of University Management System

16
University Management System

Complete Structure of the University Management System

17
University Management System

Feasibility Study
Ones the existing system has been studied, it is the task to finalize the feasibility report.
An outline of a feasibility study is as follows:
1) Statement about the objective of the problems
2) Terms of reference
3) Analysis of existing system
 Data gathering
 Data presentations
 List of files and records required
 Preparation of flow charts
 Cost estimates

18
University Management System

4) Analysis of alternatives meeting similar requirements. For each alternatives


proposed:
 Overview
 Decision
 Information flows
 Technical details
 Operational details
 Impact on the organization
 Total cost and benefits
5) Determine the main output requirements
6) Effects on company operations
7) Financial effects
8) Achievement of company objects
9) Conclusion.

System Design

The system is designed based on the objectives set for the new information system in
the strategic plan. Our outermost objectives is as follows:

1) Increasing the company profit


2) Securing the customer intact with the company
3) Improving customer services
4) Understanding user requirement
5) Suggesting a logical organization of data
6) Monitoring and controlling decision
7) Securing a larger market share.

Up to the time of system proposal, we have concerned them with the local design of the
system. Although we have decided that specific software should be purchased as well as
interface like C++. After the system proposal is agreed to, we concern them with physical
design of the system. Here we create, detailed specification for every aspect of the system. This
includes form design, file organization, procedural steps and so on.

The following are the major steps in system design:

1) Specification of data elements, records and files

19
University Management System

2) Specification in input forms, data preparation formats and identification of personnel who
will complete them.
3) Specification of system output
4) Development of system flow charts
5) Development of feedback and control procedures
6) Development of program specifications
7) Development of operating specifications
8) Resource planning and implementation:
 Phasing out the existing system
 Training user or personnel
 System review and parallel operation

Program Structure
I am developing my project on Banking Accounting System keeping in view of the functioning of
the Bank to provide computerized facility to implement customer’s records and their Daily
Transaction records.
The complete structure of the programs is shown below:

NAMING CONVENTION
Objects Naming Conventions

Header files Iostream.h, fstream.h, process.h, string.h, stdio.h, ctype.h,


conio.h,dos.h,values.h, stdlib.h, iomanip.h, graphics.h

Classes class main_menu, class shape

Modules college entry, college display, college enquiry, college modification,student


entry,student display,student enquiry,student modification,exam form
entry,exam form display,exam schedule entry,exam schedule
display,result entry,result display .

Functions normalvideo();reversevideo();box();menu();control_menu();
Ed_menu();edit_menu();help();e_menu();entry_menu();d_menu();displa
y_menu();enqu_menu();enquiry_menu();modify_menu();modification_m
enu();Line_hor( ); line_ver( ); box( ); add_to_file( );
display_list();modify();entry_newcollege();entry_newstudent();exam_for
mentry();examscheduleentry();result_entry();display_college();display_st
udent();display_examform();display_examschedule();display_resultcolleg
e_enquiry();student_enquiry();modify_college();modify_student();college
_modification();student_modification();foundation();

Objects Naming Conventions


Data files & fields
COLLEGE.dat,STUDENT.dat,FORM.dat,SCHEDULE.dat,RESULTF.dat,RESUL

20
University Management System

TS.dat,RESULTT.dat,RESULTMF.dat,RESULTMS.dat,coll_id,stu_id,form_id,c
oll_name,coll_add,coll_deg,coll_str,stu_name,stu_fname,stu_loc,stu_city,s
tu_state,stu_zip,stu_cont,stu_code,stu_strm,stu_deg,hp1,hp2,hp3,hp4,hp
5,hp6,hp7,hp8,p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12,p13,p14,p15,p16
,s1,s2,gk,com,sd1,ed1,sm1,em1,sy1,ey1

Program variables Choice; t; t_collid; t_stuid; t_formid; t_collname;t_colladd;t_colldeg;


t_collstr;t_stuname;t_stufname,t_loc,t_city,t_state,t_zip,t_cont,t_code,t_
stustrm,t_studeg,t_hp1,t_hp2,t_hp3,t_hp4,t_hp5,t_hp6,t_hp7,t_hp8,t_p1
,t_p2,t_p3,t_p4,t_p5,t_p6,t_p7,t_p8,t_p9,t_10,t_p11,t_p12,t_p13,t_p14,t
_p15,t_p16,t_s1,t_s2,t_gk,t_com,t_sd1,t_ed1,t_sm1,t_em1,t_sy1,t_ey1

Program file University.cpp

DATA STRUCTURES AND PROCESS LOGIC OF THE SYSTEM

In University Management System (UMS) four data fields namely COLLEGE.dat,


STUDENT.dat, FORM.dat, SCHEDULE.dat, RESULTF.dat, RESULTS.dat, RESULTT.dat,
RESULTMF.dat, RESULTMS.dat is used data file for various purposes e.g. deleting, modifying
etc. The principle of data design is based on ensuring the product of outputs designed by the
system. Considering data items for required outputs and the record to be retained in the master
file of our University Management System may have the following structure:

DATA STRUCTURES
COLLEGE database: collid: college id
name: college name
address: college address
stream: college stream
degree:college degree

STUDENT database: stuid:student id


Name: student name
Fname:father name
state: student state
city : student city
zip: student pin code
code: student std code
stream:student stream
degree:student degree
SCHEDULE database:
degree: degree of the exam taken
sd1: starting date
ed1: ending date
sm1: starting month
em1: ending month
sy1: starting year
ey1: ending year

21
University Management System

RESULT database:
stu_id: student id
Name: student name
Address:student address
Degree:student degree
Stream:student stream
Hp1:honours paper 1
Hp2:honours paper
Hp3: honours paper
Hp4:honours paper
Hp5:honours paper
Hp6: honours paper
Hp7: honours paper
Hp8: honours paper
P1:M.A paper
P2:M.A paper
P3: M.A paper
P4:M.A paper
P5: M.A paper
P6: M.A paper
P7: M.A paper
P8: M.A paper
P9: M.A paper
P10: M.A paper
P11: M.A paper
P12: M.A paper
P13: M.A paper
P14: M.A paper
P15: M.A paper
P16: M.A paper
S1:subscidary
S2:sdubscidary
GK:general knowledge
Com:compulsory

Process Logic
In University Management System we have provide a menu driven facility to the users
for making a process simpler, easier and faster. The menu options provided under the main
menu are listed below:

1) ENTRY: to open college, student, exam form, exam schedule, result sub menu
2) DISPLAY: to display different types of information related to entry menu
3) MODIFY: to modify student and college
4) ENQUIRY: having different types of enquiry information
5) PERFORMANCE: displays the foundation of the university
6) EXIT: exit from the main menu(project)

On the selection of ENTRY menu the following processing will occur:


COLLEGE
STUDENT
EXAM FORM

22
University Management System

EXAM SCHEDULE
RESULT
BACK TO PREVIOUS MENU
On the selection of DISPLAY menu the following processing will occur:
COLLEGE
STUDENT
EXAM FORM
EXAM SCHEDULE
RESULT
BACK TO PREVIOUS MENU
On the selection of ENQUIRY menu the following processing will occur:
COLLEGE
STUDENT
BACK TO PREVIOUS MENU
On the selection of MODIFY menu following processing will occur:
COLLEGE
STUDENT
BACK TO PREVIOUS MENU
It is delivered to the customer and enters the maintenance phase.
Important Functions and Their Purposes
This project is developed by using C++ class concepts and having number of different
user defined functions (UDFs), which are as follows:

1) Line_hor (…): This function passes four parameters including three integers and one
character to draw different lines to design the screen beautifully. The character
parameter draw the ASCII character line-by-line on the screen. So to draw horizontal
lines this function is useful.

2) Line_ver (…) : This function is helpful for drawing vertical lines on screen to we want.

3) Main_menu (…) : This is the main screening menu, which will display six different
prompts having different activities. Each prompt is connected with different menus and
then in that menu different functions to perform its respective purposes. All the option
has a sub menu .
While handling the main menu we can press any selective number to perform the
operation or press zero (0) to exit from the main menu. But it also helpful in almost all
menus that we can press zero to exit from the respective menu. In case the user can
press any key the prompt will come back from menu to source program. So it’s better to
press '0' to exit from the menu. Other than zero if we press any other key the University
Management System do not response till we press a valid number.

4) Entry_menu (…): This is one of the sub function which is connected from the Main_menu
function to perform the Entry operation of Colleges, Students, Exam form, Exam

23
University Management System

Schedule and Result.

5) Display_menu(…): This is one of the sub function which is connected from the
main_menu(…) function to perform the display list of College form College.dat, display
list of Student form Student.dat. Display the From and Schedule and Result form the
From.dat, Schedule.dat,Resultf.dat,Results.dat,Resultt.dat,Resultmf.dat,Resultms.dat.

6) Enquiry_menu(…): This is one of the sub function which is connected from the
main_menu(…) function to perform the enquiry about a particular college or about
particular student

7) Modification_menu (…): This is one of the sub function which is connected from the
main_menu function to perform the modification on operation on college information
from College.dat and student information from Student.dat.
The menus always perform the operation according to the College/Student id number
Basically, the numbers are generated automatically, like 1,2,3,4,… respectively.
While modifying any College, we have to enter the College id number and it will display
the name, address, stream, degree of that particular College and will display a prompt as
"Modify this account <Y/N> ". If we will press 'Y' then the respective information will be
modified otherwise it will return to main menu.
While modifying any Student, we have to enter the Student id number and it will display
the name, father name, address, stream, degree of that particular Student and will
display a prompt as "Modify this account <Y/N> ". If we will press 'Y' then the respective
information will be modified otherwise it will return to main menu.

8) Add_to_file (…): This function is used to append new


college/student/form/schedule/result details into the "COLLEGE.dat", “STUDENT.dat”,
“FORM.dat”, “SCHEDULE.dat”, “RESULT.dat” file. This function receives all the fields as
parameter away from the college/student/form/schedule/result function and adds it in
data file, i.e. each time a modefication is made in an file the modified information will be
modified in the data file.

9) Display_list (…): This function is used to display all the


College/Student/Form/Schedule/Result data on the screen, which display the
College/Student/Form/Schedule/Result number, name, address, and their respective
information in University.

24
University Management System

10)NEW_COLLEGE():Function for creating a new college.This is a very important function


which is used used to create new college with all the details of the college.This function
uses member functions like Last_collid(),add_to_file(),delete_account etc.The
last_collid() function will create automatically a new college id number after cheaking
from the "COLLEGE.dat" file.Here the college id numbers start from 1 onwards if it is the
first record.Also in this function the validation cheaking occurs to the
name,address,stream and degree.At the time of validation cheaking the
name,address,stream and degree should not blank and sholud not more than the
specified length.

11) Display_college():This is a function which displays the details of all the colleges under
the university with all the detail such as colleg id, college name, college address,
college stream,college degree that are under that college.Thus the user can look and
know the detail of colleges.

12) College_enquiry():This function is used to enquire about the college.This function ask for
the college id to enquire about and after matching the id it displays the record of the
enquired college.

13) College_modification():This function is used to modify the college detail.This function


asks for the college id for which the information is to be modified.Then it asks "Do
you want to Modify (Y/N)".If 'Y' is entred it asks for the user to enter new
information.

14) Found_college():Function to find a college for display college function. This is used to
find any account in the"college.dat"data files,where the file is searched from the first
record position and it searches whether the entred id exit or not. If it exit then the
variable found will return a value 1 or 0 as the parameter.

15) *return_name():Function for return name of the college from college.dat.This function is
basically used to return only name college if the college is in the "college.dat"data
file.When the name is returned it may simply display/modify other functions.

16) *return_loc():Function to return the location of the college from college.dat .This funcion
is basicially used to return only location of the college if location is in the
"College.dat" data files.When the location is returned it may simply display/modify

25
University Management System

other functions.

17) *return_str():Function to return the stream of the college from college.dat .This funcion
is basicially used to return only stream of the college if stream is in the "college.dat"
data files.When the stream is returned it may simply display/modify other functions.

18) *return_deg():Function to return the stream of the college from college.dat .This funcion
is basicially used to return only stream of the college if stream is in the "college.dat"
data files.When the stream is returned it may simply display/modify other functions.

19) box_for_display():Function to display college details.This function displays the heading


and the college id,name,location and stream on the screen.
20) box_for_enquirycollege():supporting function for college enquiry

21) new_student():Function for creating a new student.This is a very important function


which is used used to create new student with all the details of the student.This
function uses member functions like last_stuid(),add_to_file(), etc.

22) last_stuid(): function will create automatically a new student id number after cheaking
from the "STUDENT.dat" file.Here the Student id numbers start from 1 onwards if it
is the first record.Also in this function the validation cheaking occurs to the
name,father's name,address,city,state,contact number,code zip,stream and
degree.At the time of validation cheaking the name,father's
name,address,city,state,contact number,zip,stream and degree should not blank and
sholud not more than the specified length.

23) display_student():This is a function which displays the details of all the Students under
the university with all the detail such as student id, student name, student address,
student stream,student degree etc.Thus the user can look and know the detail of
student.

24) student_enquiry():This function is used to enquire about the Student.This function ask
for the student id to enquire about and after matching the id it displays the record of
the enquired student.

25) student_modification():This function is used to modify the student detail.This function


asks for the student id for which the information is to be modified.Then it asks "Do

26
University Management System

you want to Modify (Y/N)".If 'Y' is entred it asks for the user to enter new
information.

26) found_student():Function to find a student for display college function. This is used to
find any account in the "student.dat" data files,where the file is searched from the
first record position and it searches whether the entred id exit or not. If it exit then
the variable found will return a value 1 or 0 as the parameter.

27) *return_name():Function for return name of the student from student.dat.This function
is basically used to return only name student if the student is in the
"student.dat"data file.When the name is returned it may simply display/modify other
functions.

28) *return_fname():Function for return name of the student's father from student.dat.This
function is basically used to return only name student's father if the student is in the
"student.dat"data file.When the name is returned it may simply display/modify other
functions.

29) *return_address():Function to return the address of the student from student.dat .This
funcion is basicially used to return only address of the student if address is in the
"student.dat" data files.When the address is returned it may simply display/modify
other functions.

30) *return_city():Function to return the city of the student from student.dat .This funcion is
basicially used to return only city of the student if city is in the "student.dat" data
files.When the city is returned it may simply display/modify other functions.

31) *return_state():Function to return the state of the student from student.dat .This
funcion is basicially used to returnstate of the student if state is in the "student.dat"
data files.When the state is returned it may simply display/modify other functions.

32) *return_zip():Function to return the zip of the student from student.dat .This funcion is
basicially used to return only zip of the student if zip is in the "student.dat" data
files.When the zip is returned it may simply display/modify other functions.

33) *return_contact():Function to return the contact of the student from student.dat .This
funcion is basicially used to return only contact of the student if contact is in the

27
University Management System

"student.dat" data files.When the contact is returned it may simply display/modify


other functions.

34) *return_code():Function to return the code of the student from student.dat .This funcion
is basicially used to return only code of the student if code is in the "student.dat"
data files.When the code is returned it may simply display/modify other functions.

35) *return_stream():Function to return the stream of the student from student.dat .This
funcion is basicially used to return only stream of the student if stream is in the
"student.dat" data files.When the stream is returned it may simply display/modify
other functions.

36) *return_degree():Function to return the degree of the student from student.dat .This
funcion is basicially used to return only degree of the student if degree is in the
"student.dat" data files.When the degree is returned it may simply display/modify
other functions.

37) box_for_display():Function to display student detail. This function displays the student
name, student id,father name,address,contact no.,zip, city, state.

38) exam_formentry():This is a important function.This function asks for the student id for
the form entry and after entering the student id it matches the id in "STUDENT.dat" if
id is found it extract information related to that id and displays in the screen and the
writes it in to "FORM.dat" data file

39) examdisplay():This is a special function related to form it reads the student incormation
from "STUDENT.dat" and put is on the screen of Exam form entry screen after
matching the id of the student

40) display_list():This is a special function because this function displays all the forms that
are being entred and finally displays on the screen

41) exam_scheduleentry():This is a special function which is used to enter the examination


schedule which includes starting date, starting month, staring year as well as ending
date, ending month, ending year.

28
University Management System

42) display_schedulelist():This is a important function the use to.display the schedule of the
exam that are going to be conducted in the colleges.

43) result_entry():This is a special function.This funcion is used to enter the marks of the
student.This function first asks for the student id and then it flashes the student
name, address, stream, degree the it asks to enter the marks after comparing the
degree.

The flowchart of this project is as follows

START

Main Menu
1. Entry
Section()
2. Display
section()
3. Enquiry()
4. Modification()
5.
Performance()

IS ENTRY
1
CH=1?
SECTION
N
2 DISPLAY
IS SECTION
CH=1?
N
3
ENQUIRY
IS
CH=1?
N
4 MODIFY
IS SECTION
CH=1?
N

PERFOR-
IS MANCE
CH=1? 29
University Management System

STOP

C++ Program for University Management System


//PROJECT OF UNIVERSITY MANAGMENT SYSTEM
//Decleration of header files

#include<iostream.h>
#include<fstream.h>
#include<process.h>
#include<string.h>
#include<stdio.h>
#include<ctype.h>
#include<conio.h>
#include<dos.h>
#include<stdlib.h>
#include<iomanip.h>
#include<graphics.h>
typedef char option[45];
const int row=10,col=10;
int scan; //To hold the special character for moving the prompt in menu
int ascii;
//To display the main menu options
option a[]={
"1.ENTRY",
"2.DISPLAY",
"3.ENQUIRY",
"4.MODIFICATION",
"5.PERFORMANCE",
"6.EXIT",
};
//To display the ENTRY menu option.
option b[]={
"1.COLLEGE",
"2.STUDENT",
"3.EXAM FORM",
"4.EXAM SCHEDULE",
"5.RESULT",
"6.BACK TO PREVIOUS MENU",
};
//To display the DISPLAY menu option
option c[]={
"1.COLLEGE",
"2.STUDENT",
"3.EXAM FORM",
"4.EXAM SCHEDULE",
"5.RESULT",
"6.BACK TO PREVIOUS MENU",
};
//To display the ENQUIRY menu option
option d[]={
"1.COLLEGE",

30
University Management System

"2.STUDENT",
"3.BACK TO PREVIOUS MENU",
};
//To display the MODIFICATION menu option
option e[]={
"1.COLLEGE",
"2.STUDENT",
"3.BACK TO PREVIOUS MENU",
};
//To display the PERFORMANCE menu option
option f[]={
"1.FOUNDATION",
"2.BACK TO PREVIOUS MENU",
};
//Function used for screening
class main_menu
{
private:
int j,done;
public:
void normal(int x,int y,char *str);
void reverse(int x,int y,char *str);
void box(int x1,int y1,int x2,int y2);
char menu();
void control_menu();
void entry_menu();
char e_menu();
void display_menu();
char d_menu();
void enquiry_menu();
char enqu_menu();
void modification_menu();
char mod_menu();
void performance_menu();
char perform_menu();
void help(void);
void first_screen(void);

};
/*Class member for drawing boxes*/
class shape
{
public:
void line_hor(int,int,int,char);
void line_ver(int,int,int,char);
void box(int,int,int,int,char);
};
//class contain all the information of college
class college
{
public:
void new_college(void); //function for entering information of a new college
void display_list(void); //function for displaying all the colleges and their information
void college_enquiry(void); //function for enquirying about aparticular college
void college_modification(void); //function for modifying the college details
void clear(int,int); //function for performing screen clear function
int found_college(int); //function to find the college in college.dat
char *return_name(int); //function for validation entry of college name
char *return_loc(int); //function for validiation entry of college location
char *return_str(int); //function for validation entry of college stream

31
University Management System

char *return_degI(int); //function for validation entry of college


degree(b.a/b.sc/b.com)
char *return_degII(int); //function for validation entry of college degree(m.a/m.sc)
void display(int); //function for displaying college information
void modify_college(int,char [],char [],char [],char [],char []); //funcion for college
modification
int last_collid(void); //function to find the last college id in college.dat
int recordno(int); //function to find the record number in college.dat
private:
void add_to_file(int,char [],char [],char[],char[],char[]); //function to add record
void box_for_display(int); //function to draw box
void box_for_enquirycollege(int); //function to draw box
int coll_id;
char coll_name[30],coll_loc[30],coll_str[30],coll_degI[30],coll_degII[30];
};
class student
{
public:
void new_student(void); //function for entreing information of new student
void display_list(void); //function to display student details
void enquiry_student(void); //function to display particular student detail
void student_modification(void);//function to modify student information
void clear(int,int); //function for clearing screen
int found_student(int); //function to find the student in student.dat
char *return_name(int); //function for validation entry of student name
void examdisplay(int,int); //function to display information
void resultdisplay(int); //function to display information
char *return_fname(int); //function for validation entry of student father name
char *return_address(int); //function for validation entry of address
char *return_stream(int); //function for validation entry of stream
char *return_city(int); //function for validation entry of city
char *return_state(int); //function for validation entry of state
char *return_zip(int); //function for validation entry of zip
char *return_contact(int); //function for validation entry of contact number
char *return_code(int); //function for validation entry of std code
char *return_degree(int); //function for validation entry of degree
void display(int); //function to display
//function to modify the student details
void modify_student(int,char[],char[],char[],char[],char[],char[],char[]);
int last_stuid(void); //function to find the last student id in student.dat
int recordno(int); //function to find the record number in student.dat
private:
//function to add record
void add_to_file(int,char[],char[],char[],char[],char[],char[],char[],char[],char[],char[]);
void box_for_display(int); //function to draw box
void box_for_enquirystudent(int);//function to draw box
int stu_id;
char
stu_name[30],stu_fname[30],stu_add[30],stu_city[30],stu_state[30],stu_zip[30],stu_contact[30],stu_code[30],st
u_strm[30],stu_deg[30];
};
class examinfo
{
public:
void exam_formentry(); //function for the form fill up
void exam_scheduleentry(void); //function for the entry of the schedule
void display_list(void); //function to display
void display_schedulelist(void);//function to display
void result_entry(void); //function for the entry of the result
void resultdisplay_list(void); //function for the result display

32
University Management System

char *return_degname(int); //function for the valid entry of degree


int last_examformid(void); //function to find the last id
void clear(int,int); //function for clearing screen
void display(int); //function to display
//function to add record
void add_to_file_form(int,int,char[],char[],char[],char[],char[]);
//function to add record
void add_to_filebaI(int,char[],char[],int,int,int,int,int);
//function to add record
void add_to_filebaII(int,char[],char[],int,int,int,int,int);
//function to add record
void add_to_filebaIII(int,char[],char[],int,int,int,int,int);
//function to add record
void add_to_filemaI(int,char[],char[],int,int,int,int,int,int,int,int);
//function to add record
void add_to_filemaII(int,char[],char[],int,int,int,int,int,int,int,int);
private:
char
stu_deg[30],stu_name[30],stu_fname[30],stu_add[30],stu_strm[30],sd1[30],ed1[30],sm1[30],em1[30],sy1[30],e
y1[30],deg[30];
int stu_id,examform_id,hp1,hp2,hp3,hp4,hp5,hp6,hp7,hp8,s1,s2,com,gk;
int p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12,p13,p14,p15,p16;
//function to add record
void add_to_file_schedule(char[],char[],char[],char[],char[],char[],char[]);
};
class performance
{
public:
void foundation(void);
};
/*Function to display all the menu prompt message from the pointer array
of option a[]*/
void main_menu::normal(int x,int y,char *str)
{
gotoxy(x,y);
cprintf("%s",str);
}
//Function to move the cursor in the menu prompt with reverse video color
void main_menu::reverse(int x,int y,char *str)
{
textcolor(5+143);
textbackground(WHITE);
gotoxy(x,y);
cprintf("%s",str);
textcolor(GREEN);
textbackground(BLACK);
}
void main_menu::box(int x1,int y1,int x2,int y2)
{
for(int col=x1;col<x2;col++)
{
gotoxy(col,y1);
cprintf("%c",196);
gotoxy(col,y2);
cprintf("%c",196);
}
for(int row=y1;row<y2;row++)
{
gotoxy(x1,row);
cprintf("%c",179);

33
University Management System

gotoxy(x2,row);
cprintf("%c",179);
}
gotoxy(x1,y1);
cprintf("%c",218);
gotoxy(x1,y2);
cprintf("%c",192);
gotoxy(x2,y1);
cprintf("%c",191);
gotoxy(x2,y2);
cprintf("%c",217);
}
char main_menu::menu()
{
clrscr();
textcolor(22);
box(20,6,65,20);
box(18,4,67,22);
textcolor(5+143);
gotoxy(28,5);
textbackground(BLUE);
cprintf("UNIVERSITY MANAGEMENT SYSTEM");
textbackground(BLACK);
textcolor(22);
for(int i=1;i<6;i++)
normal(32,i+10,a[i]);
reverse(32,10,a[0]);
i=done=0;
_setcursortype(_NOCURSOR);//change the cursor type
do
{
int key=getch();
switch(key)
{
case 72:
normal(32,i+10,a[i]);
i--;
if(i==-1)
i=5;
reverse(32,i+10,a[i]);
break;
case 80:
normal(32,i+10,a[i]);
i++;
if(i==6)
i=0;
reverse(32,i+10,a[i]);
break;
case 13:
done=1;
}
}
while(!done);
_setcursortype(_NOCURSOR);
return(i+49);
}
/*The function main_menu() is used to display the main menu of university managment system.
This function uses 6 main options and each has its specific purposes for maintaining
the university.In this menu,the user can avail the facilities by pressing any number
from 1 to 5 and in case he presses any other key the prompt will come back from menu to the

34
University Management System

source promgram or it is better to press '0' to exit from the menu.other than 0 and 1...5
if you press any other key the university managment system do not response till you press a valid number
*/
void main_menu::control_menu()
{
char choice;
do
{
choice=menu();
clrscr();
switch(choice)
{
case '1': box(3,1,75,24);
box(5,2,73,23);
gotoxy(7,4);
entry_menu(); //sub menu of main menu
break;
case '2': box(3,1,75,24);
box(5,2,73,23);
gotoxy(7,5);
display_menu(); //sub menu of main menu
break;
case '3': box(3,1,75,24);
box(5,2,73,23);
gotoxy(7,6);
enquiry_menu(); //sub menu of main menu
break;
case '4': box(3,1,75,24);
box(5,2,73,23);
gotoxy(7,8);
modification_menu(); //sub menu of main menu
break;
case '5': box(3,1,75,24);
box(5,2,73,23);
gotoxy(7,9);
performance_menu(); //sub menu of main menu
break;
case '6': exit(0);
}
}while(choice!=5);
}
/*design of entry menu:- This function is used to return the cursor position to the entry menu function where
the menu prompt is valid(design function)*/
char main_menu::e_menu()
{
clrscr();
textcolor(22);
box(25,6,65,20);
box(23,4,67,22);
textcolor(5+143);
gotoxy(34,5);
textbackground(GREEN);
cprintf("ENTRY MENU");
textcolor(22);
textbackground(BLACK);
for(int i=1;i<6;i++)
normal(32,i+10,b[i]);
reverse(32,10,b[0]);
i=done=0;
_setcursortype(_NOCURSOR); //change the cursor

35
University Management System

do
{
int key=getch();
switch(key)
{
case 72:
normal(32,i+10,b[i]);
i--;
if(i==-1)
i=5;
reverse(32,i+10,b[i]);
break;
case 80: normal(32,i+10,b[i]);
i++;
if(i==6)
i=0;
reverse(32,i+10,b[i]);
break;
case 13:
done=1;
}
}while(!done);
_setcursortype(_NOCURSOR);
return(i+49);
}
/*Function for entry menu with open college,student,examform,schedule and result sub-menu.This is one of
the submenu which manages
five basic operations such as:
-New College
-New Student
-Exam Form
-Exam Schedule
-Result
while entering new college information college name,address,streem,degree are asked to enter
student menu provides information to add that are nessary.*/
void main_menu::entry_menu()
{
char choice;
student stu;
college coll;
examinfo einfo;
do
{
choice=e_menu();
clrscr();
switch(choice)
{
case '1':
box(3,1,75,24);
box(5,2,73,23);
_setcursortype(_NORMALCURSOR);
gotoxy(7,4);
coll.new_college(); //sub menu of entry menu
break;
case '2':
box(3,1,75,24);
box(5,2,73,23);
_setcursortype(_NORMALCURSOR);
gotoxy(7,5);
stu.new_student(); //sub menu of entry menu

36
University Management System

break;
case '3':
box(3,1,75,24);
box(5,2,73,23);
_setcursortype(_NORMALCURSOR);
gotoxy(7,6);
einfo.exam_formentry(); //sub menu of entry menu
break;
case '4':
box(3,1,75,24);
box(5,2,73,23);
_setcursortype(_NORMALCURSOR);
gotoxy(7,7);
einfo.exam_scheduleentry(); //sub menu of entry menu
break;
case '5':
box(3,1,75,24);
box(5,2,73,23);
_setcursortype(_NORMALCURSOR);
gotoxy(7,8);
einfo.result_entry(); //sub menu of entry menu
break;
case '6':
return ;
}
}while(choice!=5);
}
/*design of display menu:-This function is used to return the cursor poisition to the display menu function
where the menu prompt is valid(design part)*/
char main_menu::d_menu()
{
clrscr();
textcolor(22);
box(25,6,65,20);
box(23,4,67,22);
textcolor(5+143);
gotoxy(34,5);
textbackground(GREEN);
cprintf("DISPLAY MENU");
textcolor(22);
textbackground(BLACK);
for(int i=1;i<6;i++)
normal(32,i+10,c[i]);
reverse(32,10,c[0]);
i=done=0;
_setcursortype(_NOCURSOR); //change the cursor type
do
{
int key=getch();
switch(key)
{
case 72:
normal(32,i+10,c[i]);
i--;
if(i==-1)
i=5;
reverse(32,i+10,c[i]);
break;
case 80: normal(32,i+10,c[i]);
i++;

37
University Management System

if(i==6)
i=0;
reverse(32,i+10,c[i]);
break;
case 13:
done=1;
}
}while(!done);
_setcursortype(_NOCURSOR);
return(i+49);
}
/*Function for display menu with college, student, exam form, exam schedule, and result.This is one of the sub
menu which manages
five operations such as:
-College
-Student
-Exam Form
-Exam Schedule
-Result
while displaying records it displays all the records that were enterd in the entry section and
extract this information from their particulat database files*/
void main_menu::display_menu()
{
char choice;
college coll;
student stu;
examinfo einfo;
do
{
choice=d_menu();
clrscr();
switch(choice)
{
case '1':
box(3,1,75,24);
box(5,2,73,23);
_setcursortype(_NORMALCURSOR);
coll.display_list(); //sub menu of display menu
getch();
break;
case '2':
box(3,1,75,24);
box(5,2,73,23);
_setcursortype(_NORMALCURSOR);
stu.display_list(); //sub menu of display menu
getch();
break;
case '3':
box(3,1,75,24);
box(5,2,73,23);
_setcursortype(_NORMALCURSOR);
einfo.display_list(); //submenu of display menu
getch();
break;
case '4':
box(3,1,75,24);
box(5,2,73,23);
_setcursortype(_NORMALCURSOR);
einfo.display_schedulelist(); //sub menu of dispalay menu
getch();

38
University Management System

break;
case '5':
box(3,1,75,24);
box(5,2,73,23);
_setcursortype(_NORMALCURSOR);
einfo.resultdisplay_list(); //sub menu of display menu
getch();
break;
case '6':
return;
}
}while(choice!=5);
}
/*design of enquiry menu:-This function is used to return the cursor position to the enquiry menu function
where the menu prompt is valid(design function)*/
char main_menu::enqu_menu()
{
clrscr();
textcolor(22);
box(25,6,65,20);
box(23,4,67,22);
textcolor(5+143);
gotoxy(34,5);
textbackground(GREEN);
cprintf("ENQUIRY MENU");
textcolor(22);
textbackground(BLACK);
for(int i=1;i<3;i++)
normal(32,i+10,d[i]);
reverse(32,10,d[0]);
i=done=0;
_setcursortype(_NOCURSOR); //change the cursor type
do
{
int key=getch();
switch(key)
{
case 72:
normal(32,i+10,d[i]);
i--;
if(i==-1)
i=2;
reverse(32,i+10,d[i]);
break;
case 80: normal(32,i+10,d[i]);
i++;
if(i==3)
i=0;
reverse(32,i+10,d[i]);
break;

case 13:
done=1;
}
}while(!done);
_setcursortype(_NOCURSOR);
return(i+49);
}
/*This function is used for the enwuiry of aparticular college or student
This function asks the user to enter id of the college or student for which

39
University Management System

they want to enquir about*/


void main_menu::enquiry_menu()
{
char choice;
college coll;
student stu;
examinfo einfo;
do
{
choice=enqu_menu();
clrscr();
switch(choice)
{
case '1':
box(3,1,75,24);
box(5,2,73,23);
_setcursortype(_NORMALCURSOR);
coll.college_enquiry(); //Sub menu of Enquiry
getch();
break;
case '2':
box(3,1,75,24);
box(5,2,73,23);
_setcursortype(_NORMALCURSOR);
stu.enquiry_student(); //sub menu of Enquiry
getch();
break;
case '3':
return;
}
}while(choice!=5);
}
/*design of modify menu:-This function is used to return the cursor position to the modify menu function where
the menu prompt is valid(design function)*/
char main_menu::mod_menu()
{
clrscr();
textcolor(22);
box(25,6,65,20);
box(23,4,67,22);
textcolor(5+143);
gotoxy(34,5);
textbackground(GREEN);
cprintf("MODIFICATION MENU");
textcolor(22);
textbackground(BLACK);
for(int i=1;i<3;i++)
normal(32,i+10,e[i]);
reverse(32,10,e[0]);
i=done=0;
_setcursortype(_NOCURSOR);
do
{
int key=getch();
switch(key)
{
case 72:
normal(32,i+10,e[i]);
i--;
if(i==-1)

40
University Management System

i=2;
reverse(32,i+10,e[i]);
break;
case 80: normal(32,i+10,e[i]);
i++;
if(i==3)
i=0;
reverse(32,i+10,e[i]);
break;

case 13:
done=1;
}
}while(!done);
_setcursortype(_NOCURSOR);
return(i+49);
}
/*This function is used to modify the information of the college or student.
This function asks for the college or student id for modification.First it
shows the old record and then asks the user "Do You Want To Modify(Y/N).If
the user press yes it ask the user to enter the new information and then
saves it in their particular data files*/
void main_menu::modification_menu()
{
char choice;
college coll;
student stu;
examinfo einfo;
do
{
choice=mod_menu();
clrscr();
switch(choice)
{
case '1':
box(3,1,75,24);
box(5,2,73,23);
_setcursortype(_NORMALCURSOR);
coll.college_modification(); //sub menu of modification
break;
case '2':
box(3,1,75,24);
box(5,2,73,23);
_setcursortype(_NORMALCURSOR);
stu.student_modification(); //sub menu ofmodification
break;
case '3':
return;
}
}while(choice!=3);
}
/*design of perform menu:-This function is used to return the cursor position to the performance menu function
where the menu prompt is valid(design function)*/
char main_menu::perform_menu()
{
clrscr();
textcolor(22);
box(25,6,65,20);
box(23,4,67,22);
textcolor(5+143);

41
University Management System

gotoxy(34,5);
textbackground(GREEN);
cprintf("PERFORMANCE MENU");
textcolor(22);
textbackground(BLACK);
for(int i=1;i<2;i++)
normal(32,i+10,f[i]);
reverse(32,10,f[0]);
i=done=0;
_setcursortype(_NOCURSOR);
do
{
int key=getch();
switch(key)
{
case 72:
normal(32,i+10,f[i]);
i--;
if(i==-1)
i=1;
reverse(32,i+10,f[i]);
break;
case 80: normal(32,i+10,f[i]);
i++;
if(i==2)
i=0;
reverse(32,i+10,f[i]);
break;
case 13:
done=1;
}
}while(!done);
_setcursortype(_NOCURSOR);
return(i+49);
}
/*This function dispalys the performance of the university such as
- Foundation
-Annual Report
*/
void main_menu::performance_menu()
{
char choice;
performance perf;
do
{
choice=perform_menu();
clrscr();
switch(choice)
{
case '1':
box(2,1,77,24);
box(3,2,75,23);
_setcursortype(_NORMALCURSOR);
perf.foundation();
getch();
break;
case '2':
return;
}
}while(choice!=2);

42
University Management System

}
/* function to draw horizontal line.This public function draws one horizontal line at a time*/
void shape::line_hor(int coloumn1,int coloumn2,int row,char c)
{
for(coloumn1;coloumn1<=coloumn2;coloumn1++)
{
gotoxy(coloumn1,row);
cout<<c;
}
}

/*function to draw vertical line.this public function draws one vertical line at a time.*/
void shape::line_ver(int row1,int row2,int coloumn,char c)
{
for(row1;row1<=row2;row1++)
{
gotoxy(coloumn,row1);
cout<<c;
}
}

/*Function for drawing box.This function draws a box for menus*/


void shape::box(int coloumn1,int row1,int coloumn2,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=217;
c4=217;
l1=196;
l2=179;
}
else
{
c1=c;
c2=c;
c3=c;
c4=c;
l1=c;
c2=c;
}
gotoxy(coloumn1,row1);
cout<<c1;
gotoxy(coloumn2,row1);
cout<<c2;
gotoxy(coloumn1,row2);
cout<<c3;
gotoxy(coloumn2,row2);
cout<<c4;
coloumn1++;
coloumn2--;
line_hor(coloumn1,coloumn2,row1,l1);//Horizontal lines
line_hor(coloumn1,coloumn2,row1,l1);
coloumn1--;
coloumn2++;
row1++;

43
University Management System

row2--;
line_ver(row1,row2,coloumn1,l2);//vertical line
line_ver(row1,row2,coloumn2,l2);
}
/* Function to display help about this project.This help function is the second screen output display to know
about the menu options
and about the banking project*/
void main_menu::help(void)
{
clrscr();
setbkcolor(7);
settextstyle(2,HORIZ_DIR,6);
outtextxy(20,20,"THIS PROJECT CAN KEEP RECORD OF COLLEGE,STUDENT,RESULT &
EXAM");//60,100 //30 is good cheak it properly
delay(2);
outtextxy(20,50,"THIS PROJECT IS CAPABLE OF HOLDING ANY NO OF COLLEGE & STUDENT");
delay(2);
outtextxy(20,80,"-IN MAIN MENU FIRST OPTION IS ENTRY OPTION IN WHICH YOU CAN");
delay(2);
outtextxy(20,110,"ENTER THE DETAILS OF COLLEGE, STUDENT, EXAM AND RESULT");//60,160
delay(2);
outtextxy(27,140,"-SECOND OPTION IS DISPLAY OPTION WHICH DISPLAYS ALL THE");
delay(2);
outtextxy(25,170,"DETAILS OF COLLEGE, STUDENT, EXAM AND RESULT ACCORDING TO");
delay(2);
outtextxy(20,200,"THE CHOICE OF THE USER.");
delay(2);
outtextxy(20,230,"-THIRD OPTION IS ENQUIRY OPTION IN WHICH USER CAN ENQUIRED");
delay(2);
outtextxy(25,260,"ABOUT COLLEGES,STUDENTS,EXAM SCHEDULES.");
delay(2);
outtextxy(25,290,"-FOURTH OPTION IS MODIFICATION OPTION IN WHICH USER CAN MODIFY");
delay(2);
outtextxy(30,320,"ABOUT COLLEGE,STUDENT,EXAM SCHEDULES,RESULTS ACCORDING");
delay(2);
outtextxy(30,350,"TO USER CHOICE");
delay(2);
outtextxy(30,380,"-FIFTH OPTION IS PERFORMNACE OPTION IN WHICH USER CAN KNOW");
setbkcolor(12);
delay(2);
settextstyle(7,HORIZ_DIR,4);
outtextxy(50,420,"PRESS ANY KEY TO CONTINUE............");
getch();
clrscr();
setbkcolor(7);
settextstyle(2,HORIZ_DIR,6);
delay(2);
outtextxy(3,20,"THE ANNUAL REPORT AND FOUNDATION OF UNIVERSITY");
delay(2);
outtextxy(3,50,"-FIFTH OPTION IS EXIT, FINALLY USER CAN EXIT FROM THE PROJECT");
delay(2);
outtextxy(9,340,"NOTE:-YOU CAN PERFORM YOUR WORK AND CHOOSE A OPTION");
delay(2);
outtextxy(65,370,"AND TRAVERSES THROUGH THE ARROW KEYS");
setbkcolor(12);
delay(2);
settextstyle(7,HORIZ_DIR,4);
outtextxy(50,420,"PRESS ANY KEY TO CONTINUE............");
getch();

44
University Management System

/*This is the first screen output display to welcome to University Managemnt System and give personal details
that is
project devloper name,course and reg.no.*/
void main_menu::first_screen(void)
{
clrscr();
setbkcolor(7);
settextstyle(7,HORIZ_DIR,3);
outtextxy(20,20,"WELCOME TO UNIVERSITY MANAGMENT SYSTEM");
setcolor(30);
settextstyle(2,HORIZ_DIR,6);
outtextxy(60,100,"DEVLOPED BY:- MONIKA DUGAR");
delay(2);
outtextxy(60,130," COURSE:- DOEACC 'A' LEVEL");
delay(2);
outtextxy(60,160," REG.NO:- 494837");
setbkcolor(12);
settextstyle(7,HORIZ_DIR,4);
outtextxy(50,420,"PRESS ANY KEY TO CONTINUE............");
getch();

}
/*Function for creating a new college.This is a very important function which is used used to create new
college with
all the details of the college.This function uses member functions like last_collid(),add_to_file(),delete_account
etc.
The last_collid() function will create automatically a new college id number after cheaking from the
"COLLEGE.dat" file.
Here the college id numbers start from 1 onwards if it is the first record.Also in this function the validation
cheaking
occurs to the name,address,stream and degree.At the time of validation cheaking the name,
address,stream and degree should not blank and sholud not more than the specified length.*/
void college::new_college(void)
{
char ch;
int i,valid;
clrscr();
college coll;
shape s;
s.box(2,1,79,25,318);
s.box(25,2,54,4,219);
gotoxy(65,2);
cout<<"<0>=EXIT";
gotoxy(3,3);
for(i=1;i<=76;i++)
cprintf(" ");
textbackground(BLACK);
textcolor(BLACK+BLINK);
textbackground(WHITE);
gotoxy(30,3);
_setcursortype(_NOCURSOR);//changes cursor type
cprintf("COLLEGE-ENTRY");
textcolor(LIGHTGRAY);
textbackground(BLACK);
getch();
int d1,m1,y1;
struct date d;
getdate(&d); //For extracting system date

45
University Management System

d1=d.da_day;
m1=d.da_mon;
y1=d.da_year;
int coll_id;
coll_id=coll.last_collid();
coll_id++;
char coll_name[30],coll_loc[30],coll_str[30],coll_degI[30],coll_degII[30];
_setcursortype(_NORMALCURSOR);
gotoxy(5,6);
cout<<"DATE:-"<<d1<<"/"<<m1<<"/"<<y1;
gotoxy(5,8);
cout<<"COLLEGE-ID:"<<coll_id;
gotoxy(5,10);
cout<<"NAME:";
gotoxy(5,12);
cout<<"LOCATION:";
gotoxy(5,14);
cout<<"STREAM:";
gotoxy(5,16);
cout<<"DEGREE-I:";
gotoxy(5,18);
cout<<"DEGREE-II:";
do
{
coll.clear(16,10);
coll.clear(5,23);
gotoxy(5,23);
cout<<"ENTER THE NAME OF THE COLLEGE";
valid=1;
gotoxy(16,10);
gets(coll_name);
strupr(coll_name);
if(coll_name[0]=='0')
return;
if(strlen(coll_name)==0||strlen(coll_name)>20)
{
valid=0;
gotoxy(5,23);
cprintf("\7 NAME SHOULD NOT BE GREATER THAN 20");
getch();
}
}while(!valid);
do
{
coll.clear(28,12);
coll.clear(5,23);
gotoxy(5,23);
cout<<"ENTER THE LOCATION OF THE COLLEGE";
valid=1;
gotoxy(28,12);
gets(coll_loc);
strupr(coll_loc);
if(coll_loc[0]=='0')
return;
if(strlen(coll_loc)==0||strlen(coll_loc)>20)
{
valid=0;
gotoxy(5,23);
cprintf("\7 LOCATION SHOULD NOT BE GREATER THAN 20");
getch();

46
University Management System

}
}while(!valid);
do
{
coll.clear(26,14);
for(int i=5;i<79;i++)
{
gotoxy(i,23);
printf(" ");
}

gotoxy(5,23);
cout<<"ENTER THE STREAM OF THE COLLEGE(ARTS/SCIENCE/COMMERCE";
valid=1;
gotoxy(26,14);
gets(coll_str);
strupr(coll_str);
if(coll_str[0]=='0')
return;
if(strlen(coll_str)==0||strlen(coll_str)>20)
{
valid=0;
gotoxy(5,23);
cprintf("\7 STREAM SHOULD NOT BE GREATER THAN 20");
getch();
}
}while(!valid);
do
{
coll.clear(26,16);
for(int i=5;i<79;i++)
{
gotoxy(i,23);
printf(" ");
}
gotoxy(5,23);
cout<<"ENTER THE DEGREE COURSE FOR BACHELOR DEGREE(B.A/B.COM/B.SC)";
valid=1;
gotoxy(26,16);
gets(coll_degI);
strupr(coll_degI);
if(coll_degI[0]=='0')
return;
if(strlen(coll_degI)==0||strlen(coll_degI)>20)
{
valid=0;
gotoxy(5,23);
cprintf("\7 DEGREE SHOULD NOT BE GREATER THAN 20");
getch();
}
}while(!valid);
do
{
coll.clear(29,18);
for(int i=5;i<79;i++)
{
gotoxy(i,23);
printf(" ");
}
gotoxy(5,23);

47
University Management System

cout<<"ENTER THE DEGREE COURSE FOR MASTER DEGREE(M.A/M.SC/M.COM)";


valid=1;
gotoxy(29,18);
gets(coll_degII);
strupr(coll_degII);
if(coll_degII[0]=='0')
return;
if(strlen(coll_degII)==0||strlen(coll_degII)>20)
{
valid=0;
gotoxy(5,23);
cprintf("\7 DEGREE SHOULD NOT BE GREATER THAN 20");
getch();
}
}while(!valid);
do
{
valid=1;
for(int i=5;i<79;i++)
{
gotoxy(i,23);
printf(" ");
}
gotoxy(5,23);
cout<<"DO YOU WANT TO SAVE THE RECORD(Y/N):";
ch=getch();
if(ch==0)
return;
ch=toupper(ch);
}while(ch!='N'&&ch!='Y');
if(ch=='N')
return;
//append the record to college,dat
add_to_file(coll_id,coll_name,coll_loc,coll_str,coll_degI,coll_degII);
}
/*This is a function which displays the details of all the colleges under the university
with all the detail such as colleg id, college name, college address, college stream,college degree
that are under that college.Thus the user can look and know the detail of colleges*/
void college::display_list(void)
{
clrscr();
int flag;
fstream file;
gotoxy(25,1);
cout<<"COLLEGE DISPLAY LIST";
gotoxy(25,2);
cout<<"======================";
gotoxy(1,3);
for(int j=1;j<=79;j++)
cout<<"=";
gotoxy(1,5);
cout<<"ID";
gotoxy(4,5);
cout<<"NAME";
gotoxy(20,5);
cout<<"LOCATION";
gotoxy(34,5);
cout<<"STREAM";
gotoxy(48,5);
cout<<"DEGREE-I";

48
University Management System

gotoxy(60,5);
cout<<"DEGREE-II";
gotoxy(1,6);
for(j=1;j<=79;j++)
cout<<"=";
file.open("COLLEGE.dat",ios::in);
file.seekg(0,ios::beg);
int row=7;
while(file.read((char*)this,sizeof(college)))
{
flag=0;
delay(2);
gotoxy(1,row);
cout<<coll_id;
gotoxy(4,row);
puts(coll_name);
gotoxy(20,row);
puts(coll_loc);
gotoxy(34,row);
puts(coll_str);
gotoxy(48,row);
puts(coll_degI);
gotoxy(60,row);
puts(coll_degII);
row++;
if(row>23)
{
flag=1;
row=6;
gotoxy(4,24);
cout<<"PRESS ANY KEY TO CONTINUE";
clrscr();
}
}
gotoxy(1,row);
for(j=1;j<=79;j++)
cout<<"=";
row++;
file.close();
if(!flag)
{
gotoxy(4,24);
cout<<"PRESS ANY KEY TO CONTINUE:";
getch();
}
}
/*This function is used to enquire about the college.This function ask for the college id
to enquie about and after matching the id it displays the record of the enquired college */
void college::college_enquiry(void)
{
clrscr();
int t_collid=0;
college coll;
gotoxy(71,1);
cout<<"<0>=EXIT";
gotoxy(5,5);
cout<<"ENTER COLLEGE ID";
cin>>t_collid;
if(t_collid==0)
return;

49
University Management System

if(!coll.found_college(t_collid))
{
gotoxy(5,5);
cout<<"\7 INVALID COLLEGE ID";
getch();
return;
}
box_for_enquirycollege(t_collid);
int row=9,flag;
fstream file;
file.open("COLLEGE.dat",ios::in);
while(file.read((char*)this,sizeof(college)))
{
if(coll_id==t_collid)
{
delay(2);
gotoxy(4,row);
puts(coll_str);
gotoxy(38,row);
puts(coll_degI);
gotoxy(55,row);
puts(coll_degII);
row++;
if(row>23)
{
flag=1;
row=7;
gotoxy(4,24);
cout<<"PRESS ANY KEY TO CONTINUE:";
getch();
clrscr();
box_for_enquirycollege(t_collid);
}
}
}
file.close();
if(!flag)
{
gotoxy(4,24);
cout<<"PRESS ANY KEY TO CONTINUE";
getch();
}
}
/* This function is used to modify the college detail.This function asks for the
college id for which the information is to be modified.Then it asks "Do you want to
Modify (Y/N)".If 'Y' is entred it asks for the user to enter new information.
*/
void college::college_modification(void)
{
clrscr();
int j;
int t,t_collid;
gotoxy(17,1);
cout<<"<0>=EXIT";
gotoxy(5,5);
cout<<"ENTER THE COLLEGE ID:";
cin>>t_collid;
if(t_collid==0)
return;
clrscr();

50
University Management System

if(!found_college(t_collid))
{
gotoxy(5,5);
cout<<"\7 COLLEGE NOT FOUND:";
getch();
return;
}
gotoxy(71,1);
cout<<"<0>=EXIT";
textbackground(WHITE);
gotoxy(3,3);
for(j=1;j<=76;j++)
cprintf("");
textbackground(BLACK);
textcolor(BLACK+BLINK);
textbackground(WHITE);
gotoxy(30,3);
cprintf("MODIFY COLLEGE DETAIL");
textcolor(LIGHTGRAY);
textbackground(BLACK);
int d1,m1,y1;
struct date d;
getdate(&d);
d1=d.da_day;
m1=d.da_mon;
y1=d.da_year;
gotoxy(4,2);
cout<<"DATE:"<<d1<<"/"<<m1<<"/"<<y1;
char ch;
display(t_collid);
college coll;
do{
coll.clear(5,13);
gotoxy(5,13);
cout<<"MODIFY COLLEGE DETAILS:(Y/N)";
ch=getche();
if(ch=='0')
return;
ch=toupper(ch);
}while(ch!='N'&&ch!='Y');
if(ch=='N')
return;
int modified=0,valid;
char t_name[30],t_loc[30],t_str[30],t_degI[30],t_degII[30];
gotoxy(5,15);
cout<<"NAME:";
gotoxy(5,16);
cout<<"LOCATION:";
gotoxy(5,17);
cout<<"STREAM:";
gotoxy(5,18);
cout<<"DEGREE I:";
gotoxy(5,19);
cout<<"DEGREE II:";
do
{
coll.clear(15,15);
for(int i=5;i<79;i++)
{
gotoxy(i,23);

51
University Management System

printf(" ");
}
gotoxy(5,23);
cout<<"ENTER NAME OR PRESS ENTER FOR NO CHANGE:";
valid=1;
gotoxy(15,15);
gets(t_name);
strupr(t_name);
if(t_name[0]=='0')
return;
if(strlen(t_name)>20)
{
valid=0;
gotoxy(5,23);
cprintf("NAME SHOULD NOT BE GREATER THAN 20");
getch();
}
}while(!valid);
do
{
coll.clear(20,16);
for(int i=5;i<79;i++)
{
gotoxy(i,23);
printf(" ");
}
gotoxy(5,23);
cout<<"ENTER LOCATION OR PRESS ENTER FOR NO CHANGE:";
valid=1;
gotoxy(20,16);
gets(t_loc);
strupr(t_loc);
if(t_loc[0]=='0')
return;
if(strlen(t_loc)>20)
{
valid=0;
gotoxy(5,23);
cprintf("LOCTION SHOULD NOT BE GREATER THAN 20");
getch();
}
}while(!valid);
do
{
coll.clear(18,17);
for(int i=5;i<79;i++)
{
gotoxy(i,23);
printf(" ");
}
gotoxy(5,23);
cout<<"ENTER STREAM OR PRESS ENTER FOR NO CHANGE:";
valid=1;
gotoxy(18,17);
gets(t_str);
strupr(t_str);
if(t_str[0]=='0')
return;
if(strlen(t_str)>20)
{

52
University Management System

valid=0;
gotoxy(5,23);
cprintf("STREAM SHOULD NOT BE GREATER THAN 20");
getch();
}
}while(!valid);
do
{
coll.clear(18,18);

coll.clear(25,19);
for(int i=5;i<79;i++)
{
gotoxy(i,23);
printf(" ");
}
gotoxy(5,23);
cout<<"ENTER DEGREE OR PRESS ENTER FOR NO CHANGE:";
valid=1;
gotoxy(25,19);
gets(t_degII);
strupr(t_degII);
if(t_degII[0]=='0')
return;
if(strlen(t_degII)>20)
{
valid=0;
gotoxy(5,23);
cprintf("DEGREE SHOULD NOT BE GREATER THAN 20");
getch();
}
}while(!valid);
if(strlen(t_degII)>0)
modified=1;
if(!modified)
return;
coll.clear(5,23);
do
{
for(int i=5;i<79;i++)
{
gotoxy(i,23);
printf(" ");
}
valid=1;
gotoxy(5,21);
cout<<"DO YOU WANT TO SAVE CHANGES(Y/N)";
ch=getche();
if(ch=='0')
return;
ch=toupper(ch);
}while(ch!='N'&&ch!='Y');
if(ch=='N')
return;
modify_college(t_collid,t_name,t_loc,t_str,t_degI,t_degII);
gotoxy(5,22);
cout<<"\7 RECORD MODIFIED";
gotoxy(5,23);
cout<<"PRESS ANY KEY TO CONTINUE";
getch();

53
University Management System

/*supporting function of college*/


/*Function for clearing specified row and coloumn. By using this function you can clear
from a specified row and coloumn in your screen. Here the function utillizes
two parrameter for clearing the row and coloumn*/
void college::clear(int col,int row)
{
for(int j=col;j<=76;j++)
{
gotoxy(j,row);
cout<<"";
}
}
/* Function to find a college for display college function. This is used to find any account in the
"college.dat"data files,where the file is searched from the first record position and it searches
whether the entred id exit or not. If it exit then the variable found will return a value 1 or
0 as the parameter*/
int college::found_college(int t_collid)
{
fstream file;
file.open("college.dat",ios::in);
file.seekg(0,ios::beg);
int found=0;
//searches the specified record in college.dat data file
while(file.read((char*)this,sizeof(college)))
{
if(coll_id==t_collid)
{
found=1;
break;
}
}
file.close();
return found;
}
/*Function for return name of the college from college.dat.This function is basically used
to return only name college if the college is in the "college.dat"data file.When the name is
returned it may simply display/modify other functions*/
char *college::return_name(int t_collid)
{
fstream file;
file.open("COLLEGE.dat",ios::in);
file.seekg(0,ios::beg);
char t_name[30];
//returns the name to display at screen if found.
while(file.read((char*)this, sizeof(college)))
{
if(coll_id==t_collid)
{
strcpy(t_name,coll_name);
break;
}
}
file.close();
return t_name;
}
/*Function to return the location of the college from college.dat .This funcion is basicially
used to return only location of the college if location is in the "College.dat" data files.When
the loication is returned it may simply display/modify other functions */

54
University Management System

char *college::return_loc(int t_collid)


{
fstream file;
file.open("COLLEGE.dat",ios::in);
file.seekg(0,ios::beg);
char t_loc[30];
//return the address to display at screen if found
while(file.read((char*)this,sizeof(college)))
{
if(coll_id==t_collid)
{
strcpy(t_loc,coll_loc);
break;
}
}
file.close();
return t_loc;
}
/*Function to return the stream of the college from college.dat .This funcion is basicially
used to return only stream of the college if stream is in the "college.dat" data files.When
the stream is returned it may simply display/modify other functions */
char *college::return_str(int t_collid)
{
fstream file;
file.open("COLLEGE.dat",ios::in);
file.seekg(0,ios::beg);
char t_str[30];
//return the stream to display at screen if found
while(file.read((char*)this,sizeof(college)))
{
if(coll_id==t_collid)
{
strcpy(t_str,coll_str);
break;
}
}
file.close();
return t_str;
}
/*Function to return the stream of the college from college.dat .This funcion is basicially
used to return only stream of the college if stream is in the "college.dat" data files.When
the stream is returned it may simply display/modify other functions */
char *college::return_degI(int t_collid)
{
fstream file;
file.open("COLLEGE.dat",ios::in);
file.seekg(0,ios::beg);
char t_degI[30];
//return the degree to display at screen if found
while(file.read((char*)this,sizeof(college)))
{
if(coll_id==t_collid)
{
strcpy(t_degI,coll_degI);
break;
}
}
file.close();
return t_degI;
}

55
University Management System

/*Function to return the stream of the college from college.dat .This funcion is basicially
used to return only stream of the college if stream is in the "college.dat" data files.When
the stream is returned it may simply display/modify other functions */
char *college::return_degII(int t_collid)
{
fstream file;
file.open("COLLEGE.dat",ios::in);
file.seekg(0,ios::beg);
char t_degII[30];
//return the degree to display at screen if found
while(file.read((char*)this,sizeof(college)))
{
if(coll_id==t_collid)
{
strcpy(t_degII,coll_degII);
break;
}
}
file.close();
return t_degII;
}

/*Function to display college details.This function displays the heading and


the college id,name,location and stream on the screen*/
void college::box_for_display(int t_collid)
{
int d1,m1,y1;
struct date d;
getdate (&d);
d1=d.da_day;
m1=d.da_mon;
y1=d.da_year;
gotoxy(63,2);
cout<<"DATE:"<<d1<<"/"<<m1<<"/"<<y1;
gotoxy(4,2);
cout<<"COLLEGE ID"<<t_collid;
college coll;
char t_name[30];
strcpy(t_name,coll.return_name(t_collid));
char t_loc[30];
strcpy(t_loc,coll.return_loc(t_collid));
char t_stream[30];
strcpy(t_stream,coll.return_str(t_collid));
gotoxy(25,2);
cout<<t_name;
gotoxy(25,3);
cout<<t_loc;
gotoxy(4,5);
cout<<"ENQUIRY MENU FOR COLLEGE";
textbackground(WHITE);
textcolor(BLACK);
textcolor(WHITE);
gotoxy(1,6);
for(int i=1;i<=76;i++)
cout<<"=";
gotoxy(4,7);
cprintf("STREEM DEGREE-I DEGREE-II");
gotoxy(1,8);
for(i=1;i<=76;i++)

56
University Management System

cout<<"=";
textcolor(LIGHTGRAY);
textbackground(BLACK);
}
/*supporting function for college display*/
void college::display(int t_collid)
{
fstream file;
file.open("COLLEGE.dat",ios::in);
file.seekg(0,ios::beg);
//Display the record content matching with t_collid from COLLEGE.dat data files.
while(file.read((char*)this,sizeof(college)))
{
if(t_collid==coll_id)
{
gotoxy(8,5);
cout<<"COLLEGE ID:"<<coll_id;
gotoxy(8,6);
cout<<"NAME:";
puts(coll_name);
gotoxy(8,7);
cout<<"LOCATION:";
puts(coll_loc);
gotoxy(8,8);
cout<<"STREAM:";
puts(coll_str);
gotoxy(8,9);
cout<<"DEGREE:";
puts(coll_degI);
gotoxy(8,10);
cout<<"DEGREE:";
puts(coll_degII);
break;
}
}
file.close();
}
/*supporting function for modification of college*/
void college::modify_college(int t_collid,char t_name[30],char t_loc[30],char t_str[30],char t_degI[30],char
t_degII[30])
{
int recno;
recno=recordno(t_collid);
fstream file;
//open file COLLEGE.dat for overwrite mode.
file.open("COLLEGE.dat",ios::out|ios::ate);
strcpy(coll_name,t_name);
strcpy(coll_loc,t_loc);
strcpy(coll_str,t_str);
strcpy(coll_degI,t_degI);
strcpy(coll_degII,t_degII);
int position;
//finds the position in the data file;
position=(recno-1)*sizeof(college);
file.seekp(position);
//overwrite the modified record in to the COLLEGE.dat data file.
file.write((char *)this,sizeof(college));
file.close();
return;
}

57
University Management System

/*supporting function for generating the last college id*/


int college::last_collid(void)
{
fstream file;
file.open("COLLEGE.dat",ios::in);
file.seekg(0,ios::beg);
int count=0;
//find the last id number.
while(file.read((char *)this,sizeof(college)))
count=coll_id;
file.close();
return count;
}
/* supporting function for add to file*/
void college::add_to_file(int t_collid,char t_name[30],char t_loc[30],char t_str[30],char t_degI[30],char
t_degII[30])
{
coll_id=t_collid;
strcpy(coll_name,t_name);
strcpy(coll_loc,t_loc);
strcpy(coll_str,t_str);
strcpy(coll_degI,t_degI);
strcpy(coll_degII,t_degII);
cout<<coll_str;
//Append new record into COLLEGE.dat data files.
fstream file;
file.open("COLLEGE.dat",ios::out|ios::app);
file.write((char *)this,sizeof(college));
file.close();
}
/*supporting function for college enquiry*/
void college::box_for_enquirycollege(int t_collid)
{

/*Function for returning the record for updating college information.*/


int college::recordno(int t_collid)
{
fstream file;
file.open("COLLEGE.dat",ios::in);
file.seekg(0,ios::beg);
int count=0;
//find the records position in COLLEGE.dat data file
while(file.read((char*)this,sizeof(college)))
{
count++;
if(t_collid==coll_id)
break;
}
file.close();
return count;
}
/*Function for creating a new student.This is a very important function which is used used to create new
student with
all the details of the student.This function uses member functions like last_stuid(),add_to_file(), etc.
The last_stuid() function will create automatically a new student id number after cheaking from the
"STUDENT.dat" file.
Here the Student id numbers start from 1 onwards if it is the first record.Also in this function the validation
cheaking
occurs to the name,father's name,address,city,state,contact number,code zip,stream and degree.At the time
of validation

58
University Management System

cheaking the name,father's name,address,city,state,contact number,zip,stream and degree should not blank
and sholud not
more than the specified length.*/
void student::new_student(void)
{
char ch;
int i,valid;
clrscr();
student stu;

stu_name[30],stu_fname[30],stu_add[30],stu_city[30],stu_state[30],stu_zip[30],stu_cont[30],stu_code[30],stu_
strm[30],stu_deg[30];
_setcursortype(_NORMALCURSOR);
gotoxy(5,6);
cout<<"DATE:-"<<d1<<'/'<<m1<<'/'<<y1;
gotoxy(5,7);
cout<<"STUDENT ID:-"<<stu_id;
gotoxy(5,8);
cout<<"STUDENT NAME:-";
gotoxy(5,9);
cout<<"FATHERS NAME:-";
gotoxy(5,10);
cout<<"ADDRESS:-";
gotoxy(5,11);
cout<<"CITY:-";
gotoxy(5,12);
cout<<"STATE:-";
gotoxy(5,13);
cout<<"ZIP CODE:-";
gotoxy(5,14);
cout<<"CONTACT NO:-";
gotoxy(5,15);
cout<<"STD CODE:-";
gotoxy(5,16);
cout<<"STUDENT STREAM:-";
gotoxy(5,17);
cout<<"STUDENT DEGREE:-";
do
{
clear(24,8);
clear(5,23);
gotoxy(5,23);
cout<<"ENTER THE NAME OF THE STUDENT";
valid=1;
gotoxy(24,8);
gets(stu_name);
strupr(stu_name);
if(stu_name[0]=='0')
return;
if(strlen(stu_name)==0 || strlen(stu_name)>20)
{
valid=0;
gotoxy(5,23);
cprintf("NAME SHOULD NOT BE GREATER THAN 20");
getch();
}
}
while(!valid);
do
{

59
University Management System

clear(24,9);
for(int i=5;i<79;i++)
{
gotoxy(i,23);
printf(" ");
}
gotoxy(5,23);
cout<<"ENTER FATHER'S NAME";
valid=1;
gotoxy(24,9);
gets(stu_fname);
strupr(stu_fname);
if(stu_fname[0]=='0')
return;
if(strlen(stu_fname)=='0' || strlen(stu_fname)>20)
{
valid=0;
gotoxy(5,23);
cprintf("NAME SHOULD NOT BE GREATER THAN 20");
getch();
}
}while(!valid);
do
{
clear(19,10);
for(int i=5;i<79;i++)
{
gotoxy(i,23);
printf(" ");
}
gotoxy(5,23);
cout<<"ENTER THE ADDRESS";
valid=1;
gotoxy(19,10);
gets(stu_add);
strupr(stu_add);
if(stu_add[0]=='0')
return;
if(strlen(stu_add)==0 || strlen(stu_add)>20)
{
valid=0;
gotoxy(5,23);
cprintf("ADDRESS SHOULD NOT BE GREATER THAN 20");
getch();
}
}while(!valid);
do
{
clear(16,11);
for(int i=5;i<79;i++)
{
gotoxy(i,23);
printf(" ");
}
gotoxy(5,23);
cout<<"ENTER CITY NAME";
valid=1;
gotoxy(16,11);
gets(stu_city);
strupr(stu_city);

60
University Management System

if(stu_city[0]=='0')
return;
if(strlen(stu_city)==0 || strlen(stu_city)>20)
{
valid=0;
gotoxy(5,23);
cprintf("CITY NAME SHOULD NOT BE GREATER THAN 20");
getch();
}
}while(!valid);
do
{
clear(17,12);
for(int i=5;i<79;i++)
{
gotoxy(i,23);
printf(" ");
}
gotoxy(5,23);
cout<<"ENTER STATE";
valid=1;
gotoxy(17,12);
gets(stu_state);
strupr(stu_state);
if(stu_state[0]=='0')
return;
if(strlen(stu_state)==0 || strlen(stu_state)>20)
{
valid=0;
gotoxy(5,23);
cprintf("STATE NAME SHOULD NOT BE GREATER THAN 20");
getch();
}
}while(!valid);
do
{
clear(20,13);
for(int i=5;i<79;i++)
{
gotoxy(i,23);
printf(" ");
}
gotoxy(5,23);
cout<<"ENTER THE ZIP CODE";
valid=1;
gotoxy(20,13);
gets(stu_zip);
if(stu_name[0]=='0')
return;
if(strlen(stu_zip)==0 || strlen(stu_zip)>8)
{
valid=0;
gotoxy(5,23);
cprintf("NAME SHOULD NOT BE GREATER THAN 8");
getch();
}
}while(!valid);
do
{
clear(22,14);

61
University Management System

for(int i=5;i<79;i++)
{
gotoxy(i,23);
printf(" ");
}
gotoxy(5,23);
cout<<"ENTER THE CONTACT NO.";
valid=1;
gotoxy(22,14);
gets(stu_cont);
if(stu_cont[0]=='0')
return;
if(strlen(stu_cont)==0 || strlen(stu_cont)>10)
{
valid=0;
gotoxy(5,23);
cprintf("CONTACT NO. SHOULD NOT BE GREATER THAN 10");
getch();
}
}while(!valid);
do
{
clear(20,15);
for(int i=5;i<79;i++)
{
gotoxy(i,23);
printf(" ");
}
gotoxy(5,23);
cout<<"ENTER THE STD CODE";
valid=1;
gotoxy(20,15);
gets(stu_code);
if(stu_code[0]=='0')
return;
if(strlen(stu_code)==0 || strlen(stu_code)>10)
{
valid=0;
gotoxy(5,23);
cprintf("CODE SHOULD NOT BE GREATER THAN 10");
getch();
}
}while(!valid);
do
{
clear(26,16);
for(int i=5;i<79;i++)
{
gotoxy(i,23);
printf(" ");
}
gotoxy(5,23);
cout<<"ENTER THE STREAM CODE";
valid=1;
gotoxy(26,16);
gets(stu_strm);
strupr(stu_strm);
if(stu_strm[0]=='0')
return;
if(strlen(stu_strm)==0 || strlen(stu_strm)>20)

62
University Management System

{
valid=0;
gotoxy(5,23);
cprintf("STREAM SHOULD NOT BE GREATER THAN 20");
getch();
}
}while(!valid);
do
{
clear(26,17);
for(int i=5;i<79;i++)
{
gotoxy(i,23);
printf(" ");
}
gotoxy(5,23);
cout<<"ENTER THE DEGREE CODE(B.A/B.SC/B.COM-I/II/III Or MA/M.SC/M.COM-
I/II)";
valid=1;
gotoxy(26,17);
gets(stu_deg);
strupr(stu_deg);
if(stu_deg[0]=='0')
return;
if(strlen(stu_deg)==0 || strlen(stu_deg)>20)
{
valid=0;
gotoxy(5,23);
cprintf("DEGREE SHOULD NOT BE GREATER THAN 20");
getch();
}
}while(!valid);
stu.clear(5,23);
do
{
valid=1;
for(int i=5;i<79;i++)
{
gotoxy(i,23);
printf(" ");
}
gotoxy(5,23);
cout<<"DO YOU WANT TO SAVE THE RECORD (Y/N):-";
ch=getche();
if(ch==0)
return;
ch=toupper(ch);
}while(ch!='N'&&ch!='Y');
if(ch=='N')
return;
//append the recore to student .dat.

add_to_file(stu_id,stu_name,stu_fname,stu_add,stu_city,stu_state,stu_zip,stu_cont,stu_code,stu_strm,stu_de
g);

}
/*This is a function which displays the details of all the Students under the university
with all the detail such as student id, student name, student address, student stream,student degree

63
University Management System

etc.Thus the user can look and know the detail of student*/
void student::display_list(void)
{
clrscr();
int flag;
fstream file;
gotoxy(25,1);
cout<<"STUDENT DISPLAY LIST";
gotoxy(25,2);
cout<<"=====================";
gotoxy(1,3);
for(int j=1;j<=79;j++)
cout<<"=";
gotoxy(1,5);
cout<<"STUID";
gotoxy(10,5);
cout<<"NAME";
gotoxy(26,5);
cout<<"FATHER NAME";
gotoxy(43,5);
cout<<"ADDRESS";
gotoxy(62,5);
cout<<"STREAM";
gotoxy(72,5);
cout<<"DEG";
gotoxy(1,6);
for(j=1;j<=79;j++)
cout<<"=";
file.open("STUDENT.dat0",ios::in);
file.seekg(0,ios::beg);
int row=7;
//reads all the record to display on the screen
while(file.read((char*)this,sizeof(student)))
{
flag=0;
delay(2);
gotoxy(1,row);
cout<<stu_id;
gotoxy(10,row);
puts(stu_name);
gotoxy(26,row);
puts(stu_fname);
gotoxy(43,row);
puts(stu_add);
gotoxy(63,row);
puts(stu_strm);
gotoxy(73,row);
puts(stu_deg);
row++;
if(row>23)
{
flag=1;
row=6;
gotoxy(4,24);
cout<<"PRESS ANY KEY TO CONTINUE";
getch();
clrscr();
}
}
gotoxy(1,row);

64
University Management System

for(j=1;j<=79;j++)
cout<<"=";
row++;
file.close();
if(!flag)
{
gotoxy(4,24);
cout<<"PRESS ANY KEY TO CONTINUE.....";
getch();
}
}
/*This function is used to enquire about the Student.This function ask for the student id
to enquire about and after matching the id it displays the record of the enquired student */
void student::enquiry_student(void)
{
clrscr();
int t_stuid=0;
student stu;
gotoxy(71,1);
cout<<"<0>=EXIT";
gotoxy(5,5);
cout<<"ENTER STUDENT ID:";
cin>>t_stuid;
if(t_stuid==0)
return;
clrscr();
if(!stu.found_student(t_stuid))
{
gotoxy(5,5);
cout<<"\7 INVALLID STUDENT ID";
getch();
return;
}
//Displays the haeading from this function.
box_for_enquirystudent(t_stuid);
int row=9,flag;
fstream file;
file.open("STUDENT.dat",ios::in);
while(file.read((char*)this,sizeof(student)))
{
if(stu_id==t_stuid)
{
delay(2);
gotoxy(4,row);
puts(stu_state);
gotoxy(14,row);
puts(stu_zip);
gotoxy(25,row);
puts(stu_code);
gotoxy(38,row);
puts(stu_contact);
gotoxy(57,row);
puts(stu_strm);
gotoxy(70,row);
puts(stu_deg);
row++;
if(row>23)
{
flag=1;
row=7;

65
University Management System

gotoxy(4,24);
cout<<"PRESS ANY KEY TO CONTINUE:";
getch();
box_for_enquirystudent(t_stuid);
}
}
}
file.close();
if(!flag)
{
gotoxy(4,24);
cout<<"PRESS ANY KEY TO CONTINUE:";
getch();
}
}
/* This function is used to modify the student detail.This function asks for the
student id for which the information is to be modified.Then it asks "Do you want to
Modify (Y/N)".If 'Y' is entred it asks for the user to enter new information.
*/
void student::student_modification(void)
{
clrscr();
int j;
int t,t_stuid;
gotoxy(17,1);
cout<<"<0>=EXIT";
gotoxy(5,5);
cout<<"ENTER THE STUDENT ID:-";
cin>>t_stuid;
if(t_stuid==0)
return;
clrscr();
if(!found_student(t_stuid))
{
gotoxy(5,5);
cout<<"\7 STUDENT NOT FOUND";
getch();
return;
}
gotoxy(71,1);
cout<<"<0>=EXIT";
textbackground(WHITE);
gotoxy(3,3);
for(j=1;j<=76;j++)
cprintf(" ");
textbackground(BLACK);
textcolor(BLACK+WHITE);
textbackground(WHITE);
gotoxy(30,3);
cprintf("MODIFY STUDENT DETAIL SCREEN:");
textcolor(LIGHTGRAY);
textbackground(BLACK);
int d1,m1,y1;
struct date d;
getdate(&d);
d1=d.da_day;
m1=d.da_mon;
y1=d.da_year;
gotoxy(4,2);
cout<<"DATE:"<<d1<<"/"<<m1<<"/"<<y1;

66
University Management System

char ch;
display(t_stuid);
student stu;
do
{
stu.clear(5,13);
gotoxy(5,13);

cout<<"MODIFY THESE COLLEGE DETAILS<Y/N>";


ch=getche();
if(ch=='0')
return;
ch=toupper(ch);
}
while(ch!='N' && ch!='Y');
if(ch=='N')
return;
int modified=0,valid;
char
t_name[30],t_fname[30],t_add[30],t_stream[30],t_city[30],t_state[30],t_zip[30],t_code[10],t_contact[30],t_deg[3
0];

gets(t_state);
strupr(t_state);
if(t_state[0]=='0')
return;
if(strlen(t_state)>20)
{
valid=0;
gotoxy(5,23);
cprintf("\7 STATE SHOULD NOT BE GREATER THAN 20");
getch();
}
}
while(!valid);
do
{ stu.clear(23,19);
for(int i=5;i<79;i++)
{
gotoxy(i,23);
printf(" ");
}
gotoxy(5,23);
cout<<"ENTER CONTACT OR PRESS ENTER FOR NO CHANGE";
valid=1;
gotoxy(23,19);
gets(t_contact);
strupr(t_contact);
if(t_contact[0]=='0')
return;
if(strlen(t_contact)>10)
{
valid=0;
gotoxy(5,23);
cprintf("\7 CONTACT SHOULD NOT BE GREATER THAN 10");
getch();
}
}
while(!valid);
do

67
University Management System

{
stu.clear(18,20);
for(int i=5;i<79;i++)
{
gotoxy(i,23);
printf(" ");
}
gotoxy(5,23);
cout<<"ENTER STREEM OR PRESS ENTER FOR NO
CHANGE(ARTS/SCIENCE/COMMERCE)";
valid=1;
gotoxy(18,20);
gets(t_stream);
strupr(t_stream);
if(t_stream[0]=='0')
return;
if(strlen(t_stream)>20)
{
valid=0;
gotoxy(5,23);
cprintf("\7 STREEM SHOULD NOT BE GREATER THAN 20");
getch();
}
}
while(!valid);
do
{
stu.clear(18,21);
for(int i=5;i<79;i++)
{
gotoxy(i,23);
printf(" ");
}
gotoxy(1,23);
cout<<"ENTER DEGREE OR PRESS ENTER FOR NO CHANGE(B.A/B.SC/B.COM-I/II/III
OR M.A/M.SC-I/II)";
valid=1;
gotoxy(18,21);
gets(t_deg);
strupr(t_deg);
if(t_deg[0]=='0')
return;
if(strlen(t_deg)>20)
{
valid=0;
gotoxy(5,23);
cprintf("\7 DEGREE SHOULD NOT BE GREATER THAN 20");
getch();
}
}while(!valid);
if(strlen(t_deg)>0)
modified=1;
if(!modified)
return;
for(int i=1;i<81;i++)
{
gotoxy(i,23);
printf(" ");

68
University Management System

for(i=1;i<80;i++)
{
gotoxy(i,24);
printf(" ");
}
//clears the screen at 23rd row & from 5th coloum
stu.clear(5,23);
do
{
gotoxy(5,23);
cout<<"DO YOU WANT TO SAVE CHANGES (Y/N):-";
ch=getche();
if(ch=='0')
return;
ch=toupper(ch);
}while(ch!='N' && ch!='Y');
if(ch=='N')
return;
//passes the parameter to add in data file
modify_student(t_stuid,t_name,t_fname,t_add,t_state,t_contact,t_stream,t_deg);
for(i=5;i<79;i++)
{
gotoxy(i,23);
printf(" ");
}
gotoxy(5,23);
cout<<"\7 RECORD MODIFIED";
gotoxy(5,24);
cout<<"PRESS ANY KEY TO CONTINUE";
getch();

}
/*supporting function function for student*/
/*Function for clearing specified row and coloumn. By using this function you can clear
from a specified row and coloumn in your screen. Here the function utillizes
two parrameter for clearing the row and coloumn*/
void student::clear(int col,int row)
{
for(int j=col;j<=79;j++)
{
gotoxy(j,row);
cout<<"";
}
}
/* Function to find a student for display college function. This is used to find any account in the
"student.dat"data files,where the file is searched from the first record position and it searches
whether the entred id exit or not. If it exit then the variable found will return a value 1 or
0 as the parameter*/
int student::found_student(int t_stuid)
{
fstream file;
file.open("student.dat",ios::in);
file.seekg(0,ios::beg);
int found=0;
//searches the specified record in student.dat data file
while(file.read((char*)this,sizeof(student)))
{
if(stu_id==t_stuid)
{

69
University Management System

found=1;
break;
}
}
file.close();
return found;
}
/*Function for return name of the student from student.dat.This function is basically used
to return only name student if the student is in the "student.dat"data file.When the name is
returned it may simply display/modify other functions*/
char *student::return_name(int t_stuid)
{
fstream file;
file.open("STUDENT.dat",ios::in);
file.seekg(0,ios::beg);
char t_name[30];
//returns the name to display at screen if found.
while(file.read((char*)this, sizeof(student)))
{
if(stu_id==t_stuid)
{
strcpy(t_name,stu_name);
break;
}
}
file.close();
return t_name;
}
/*Function for return name of the student's father from student.dat.This function is basically used
to return only name student's father if the student is in the "student.dat"data file.When the name is
returned it may simply display/modify other functions*/
char *student::return_fname(int t_stuid)
{
fstream file;
file.open("STUDENT.dat",ios::in);
file.seekg(0,ios::beg);
char t_fname[30];
//returns the father name to display at screen if found.
while(file.read((char*)this, sizeof(student)))
{
if(stu_id==t_stuid)
{
strcpy(t_fname,stu_fname);
break;
}
}
file.close();
return t_fname;
}

/*Function to return the address of the student from student.dat .This funcion is basicially
used to return only address of the student if address is in the "student.dat" data files.When
the address is returned it may simply display/modify other functions */
char *student::return_address(int t_stuid)
{
fstream file;
file.open("STUDENT.dat",ios::in);
file.seekg(0,ios::beg);
char t_address [30];
//return the address to display at screen if found

70
University Management System

while(file.read((char*)this,sizeof(student)))
{
if(stu_id==t_stuid)
{
strcpy(t_address,stu_add);
break;
}
}
file.close();
return t_address;
}
/*Function to return the city of the student from student.dat .This funcion is basicially
used to return only city of the student if city is in the "student.dat" data files.When
the city is returned it may simply display/modify other functions */
char *student::return_city(int t_stuid)
{
fstream file;
file.open("STUDENT.dat",ios::in);
file.seekg(0,ios::beg);
char t_city [30];
//return the city to display at screen if found
while(file.read((char*)this,sizeof(student)))
{
if(stu_id==t_stuid)
{
strcpy(t_city,stu_city);
break;
}
}
file.close();
return t_city;
}
/*Function to return the state of the student from student.dat .This funcion is basicially
used to return only state of the student if state is in the "student.dat" data files.When
the state is returned it may simply display/modify other functions */
char *student::return_state(int t_stuid)
{
fstream file;
file.open("STUDENT.dat",ios::in);
file.seekg(0,ios::beg);
char t_state [30];
//return the state to display at screen if found
while(file.read((char*)this,sizeof(student)))
{
if(stu_id==t_stuid)
{
strcpy(t_state,stu_state);
break;
}
}
file.close();
return t_state;
}
/*Function to return the zip of the student from student.dat .This funcion is basicially
used to return only zip of the student if zip is in the "student.dat" data files.When
the zip is returned it may simply display/modify other functions */
char *student::return_zip(int t_stuid)
{
fstream file;
file.open("STUDENT.dat",ios::in);

71
University Management System

file.seekg(0,ios::beg);
char t_zip[30];
//return the zip to display at screen if found
while(file.read((char*)this,sizeof(student)))
{
if(stu_id==t_stuid)
{
strcpy(t_zip,stu_zip);
break;
}
}
file.close();
return t_zip;
}

/*Function to return the contact of the student from student.dat .This funcion is basicially
used to return only contact of the student if contact is in the "student.dat" data files.When
the contact is returned it may simply display/modify other functions */
char *student::return_contact(int t_stuid)
{
fstream file;
file.open("STUDENT.dat",ios::in);
file.seekg(0,ios::beg);
char t_contact [30];
//return the contact to display at screen if found
while(file.read((char*)this,sizeof(student)))
{
if(stu_id==t_stuid)
{
strcpy(t_contact,stu_contact);
break;
}
}
file.close();
return t_contact;
}
/*Function to return the code of the student from student.dat .This funcion is basicially
used to return only code of the student if code is in the "student.dat" data files.When
the code is returned it may simply display/modify other functions */
char *student::return_code(int t_stuid)
{
fstream file;
file.open("STUDENT.dat",ios::in);
file.seekg(0,ios::beg);
char t_code [30];
//return the code to display at screen if found
while(file.read((char*)this,sizeof(student)))
{
if(stu_id==t_stuid)
{
strcpy(t_code,stu_code);
break;
}
}
file.close();
return t_code;
}
/*Function to return the stream of the student from student.dat .This funcion is basicially
used to return only stream of the student if stream is in the "student.dat" data files.When
the stream is returned it ma

72
University Management System

y simply display/modify other functions */


char *student::return_stream(int t_stuid)
{
fstream file;
file.open("STUDENT.dat",ios::in);
file.seekg(0,ios::beg);
char t_stream [30];
//return the stream to display at report screen if found
while(file.read((char*)this,sizeof(student)))
{
if(stu_id==t_stuid)
{
strcpy(t_stream,stu_strm);
break;
}
}
file.close();
return t_stream;
}
/*Function to return the degree of the student from student.dat .This funcion is basicially
used to return only degree of the student if degree is in the "student.dat" data files.When
the degree is returned it may simply display/modify other functions */

char *student::return_degree(int t_stuid)


{
fstream file;
file.open("STUDENT.dat",ios::in);
file.seekg(0,ios::beg);
char t_deg[30];
//return the stream to display at report screen if found
while(file.read((char*)this,sizeof(student)))
{
if(stu_id==t_stuid)
{
strcpy(t_deg,stu_deg);
break;
}
}
file.close();
return t_deg;
}

/*Function to display student detail. This function displays the student name,
student id,father name,address,contact no.,zip, city, state.*/
void student::box_for_display(int t_stuid)
{
int d1,m1,y1;
struct date d;
getdate(&d);
d1=d.da_day;
m1=d.da_mon;
y1=d.da_year;
gotoxy(63,2);
cout<<"DATE:-"<<d1<<"/"<<m1<<"/"<<y1;
gotoxy(4,2);

/*supporting function for student enquiry*/


void student::box_for_enquirystudent(int t_stuid)
{
int d1,m1,y1;

73
University Management System

struct date d;
getdate(&d);
d1=d.da_day;
m1=d.da_mon;
y1=d.da_year;
gotoxy(63,2);
cout<<"DATE:-"<<d1<<"/"<<m1<<"/"<<y1;
gotoxy(4,2);
cout<<"STUDENT ID:"<<t_stuid;
student stu;
char t_name[30];
strcpy(t_name,stu.return_name(t_stuid));
char t_add[30];
strcpy(t_add,stu.return_address(t_stuid));
char t_fname[30];
strcpy(t_fname,stu.return_fname(t_stuid));
gotoxy(25,2);
cout<<t_name;
gotoxy(25,3);
cout<<t_fname;
gotoxy(25,3);
cout<<t_add;
gotoxy(4,5);
cout<<"ENQUIRY REPORT OF STUDENT";
textbackground(WHITE);
textcolor(BLACK);
textbackground(WHITE);
gotoxy(1,6);
for(int i=1;i<=79;i++)
cout<<"=";
gotoxy(4,7);
cprintf("STATE ZIP CODE CONTACT STREAM DEGREE");
gotoxy(1,8);
for(i=1;i<=79;i++)
cout<<"=";
textcolor(LIGHTGRAY);
textbackground(BLACK);
}
/*Function for returning the record for updating college information.*/
int student::recordno(int t_stuid)
{
fstream file;
file.open("STUDENT.dat",ios::in);
file.seekg(0,ios::beg);
int count=0;
//find the records position in COLLEGE.dat data file
while(file.read((char*)this,sizeof(student)))
{
count++;
if(t_stuid==stu_id)
break;
}
file.close();
return count;
}
/*This is a important function.This function asks for the student id for the
form entry and after entering the student id it matches the id in "STUDENT.dat"
if id is found it extract information related to that id and displays in the
screen and the writes it in to "FORM.dat" data file*/
void examinfo::exam_formentry()

74
University Management System

{
clrscr();
int t,valid,i,t_stuid;
student stu;
examinfo einfo;
shape s;
s.box(2,1,79,25,218);
s.box(25,2,54,4,219);
gotoxy(5,5);
cout<<"ENTER THE STUDENT ID:-";
cin>>t_stuid;
if(t_stuid==0)
return;
if(!stu.found_student(t_stuid))
{
gotoxy(5,5);
cout<<"\7 STUDENT NOT FOUND";
getch();
return;
}
gotoxy(65,2);
cout<<"<0>=EXIT";
gotoxy(3,3);
for(i=1;i<=76;i++)
cprintf(" ");
textbackground(BLACK);
textcolor(BLACK+BLINK);
textbackground(WHITE);
gotoxy(30,3);
cout<<"EXAM ENTRY FORM";
textcolor(LIGHTGRAY);
textbackground(BLACK);
int d1,m1,y1;
struct date d;
getdate(&d);
d1=d.da_day;
m1=d.da_mon;
y1=d.da_year;
int examform_id;
char ch;
examform_id=einfo.last_examformid();
examform_id++;
gotoxy(5,6);
cout<<"DATE:-"<<d1<<"/"<<m1<<"/"<<y1;
gotoxy(5,8);
cout<<"EXAM FORM ID:-"<<examform_id;
gotoxy(5,9);
cout<<"NAME:-";
gotoxy(5,10);
cout<<"FATHER NAME:-";
gotoxy(5,11);
cout<<"ADDRESS:-";
gotoxy(5,12);
cout<<"STREAM:-";
gotoxy(5,13);
cout<<"DEGREE:-";
stu.examdisplay(t_stuid,examform_id);
}
/* supporting function for add to file for student*/

75
University Management System

void examinfo::add_to_file_form(int t_stuid,int t_examformid,char t_name[30],char t_fname[30],char


t_add[30],char t_strm[30],char t_deg[30])
{
fstream file;
stu_id=t_stuid;
examform_id=t_examformid;
strcpy(stu_name,t_name);
strcpy(stu_fname,t_fname);
strcpy(stu_add,t_add);
strcpy(stu_strm,t_strm);
strcpy(stu_deg,t_deg);
//append newm record into STUDENT.dat data file.
file.open("FORM.dat",ios::out|ios::app);
file.write((char *)this,sizeof(examinfo));
file.close();
}
/*supporting function for creating last student id*/
int examinfo:: last_examformid(void)
{
fstream file;
file.open("FORM.dat",ios::in);
file.seekg(0,ios::beg);
int count=0;
//find the last id number
while(file.read((char *)this,sizeof(examinfo)))
count=examform_id;
file.close();
return count;
}
/*Function for clearing specified row and coloumn. By using this function you can clear
from a specified row and coloumn in your screen. Here the function utillizes
two parrameter for clearing the row and coloumn*/
void examinfo::clear(int col,int row)
{
for(int j=col;j<=79;j++)
{
gotoxy(j,row);
cout<<"";
}
}
/*This is a special function related to form it reads the student incormation
from "STUDENT.dat" and put is on the screen of Exam form entry screen after
matching the id of the student*/
void student::examdisplay(int t_stuid,int t_examformid)
{

fstream file;
examinfo einfo;
char tstu_name[30],tstu_fname[30],tstu_add[30],tstu_strm[30],tstu_deg[30];
file.open("STUDENT.dat",ios::in);
file.seekg(0,ios::beg);
//displays the record content matching with t_stuid from STUDENT.dat data files.
while(file.read((char *)this,sizeof(student)))
{
if(t_stuid==stu_id)
{

gotoxy(16,9);
puts(stu_name);
strcpy(tstu_name,stu_name);

76
University Management System

gotoxy(24,10);
puts(stu_fname);
strcpy(tstu_fname,stu_fname);
gotoxy(19,11);
puts(stu_add);
strcpy(tstu_add,stu_add);
gotoxy(18,12);
puts(stu_strm);
strcpy(tstu_strm,stu_strm);
gotoxy(18,13);
puts(stu_deg);
strcpy(tstu_deg,stu_deg);

}
}
file.close();
char ch;
do
{
einfo.clear(5,23);
gotoxy(5,23);
cout<<"DO YOU WANT TO SAVE THE RECORD (Y/N):-";
ch=getche();
if(ch==0)
return;
ch=toupper(ch);
}while(ch!='N' && ch!='Y');
if(ch=='N')
return;
else
{
einfo.add_to_file_form(t_stuid,t_examformid,tstu_name,tstu_fname,tstu_add,tstu_strm,tstu_deg);

}
}
/*This is a special function because this function displays all the forms that
are being entred and finally displays on the screen*/
/* supporting function for add to file for student*/
void examinfo::add_to_file_schedule(char t_deg[30],char t_sd1[30],char t_ed1[30],char t_sm1[30],char
t_em1[30],char t_sy1[30],char t_ey1[30])
{
fstream file;
strcpy(sd1,t_sd1);
strcpy(ed1,t_ed1);
strcpy(sm1,t_sm1);
strcpy(em1,t_em1);
strcpy(sy1,t_sy1);
strcpy(ey1,t_ey1);
strcpy(deg,t_deg);
//append newm record into STUDENT.dat data file.
file.open("SCHEDULE.dat",ios::out|ios::app);
file.write((char *)this,sizeof(examinfo));
file.close();
}
/*This is a important function the use to display the schedule of the exam
that are going to be conducted in the colleges*/
/*This is a special function.This funcion is used to enter the marks of the
student.This function first asks for the student id and then it flashes the
student name, address, stream, degree the it asks to enter the marks after comparing

77
University Management System

the degree*/
void examinfo::result_entry(void)
{
char ch;
int i,valid,t_stuid,thp1,thp2,thp3,thp4,thp5,thp6,ts1,ts2,tcom,tgk,tp1,tp2,tp3,tp4,tp5,tp6;
clrscr();
char tstu_name[30],tstu_fname[30],tstu_add[30],tstu_strm[30],tstu_deg[30];
shape s;
student stu;
s.box(2,1,79,25,218);
s.box(25,2,54,4,219);
gotoxy(65,2);
cout<<"<0>=EXIT";
gotoxy(5,3);
cout<<"ENTER THE STUDENT ID:-";
cin>>t_stuid;
if(!stu.found_student(t_stuid))
{
gotoxy(5,4);
cout<<"\7 STUDENT NOT FOUND";
getch();
return;
}
gotoxy(65,2);
cout<<"<0>=EXIT";
gotoxy(3,3);
for(i=1;i<=79;i++)
cprintf("");
textbackground(BLACK);
textcolor(BLACK+BLINK);
textbackground(WHITE);
gotoxy(30,3);
cprintf("RESULT ENTRY");
textcolor(LIGHTGRAY);
textbackground(BLACK);
int d1,m1,y1;
struct date d;
getdate(&d);
d1=d.da_day;
m1=d.da_mon;
y1=d.da_year;
gotoxy(5,6);
cout<<"DATE:-"<<d1<<"/"<<m1<<"/"<<y1;
gotoxy(5,8);
cout<<"NAME:-";
gotoxy(5,10);
cout<<"DEGREE:-";
gotoxy(5,12);
cout<<"STREAM:-";
stu.resultdisplay(t_stuid);
}
void student::resultdisplay(int t_stuid)
{

fstream file;
examinfo einfo;
char tstu_name[30],tstu_fname[30],tstu_add[30],tstu_strm[30],tstu_deg[30];
int thp1,thp2,thp3,thp4,thp5,thp6,thp7,thp8,ts1,ts2,tcom,tgk;
int tp1,tp2,tp3,tp4,tp5,tp6,tp7,tp8,tp9,tp10,tp11,tp12,tp13,tp14,tp15,tp16;
file.open("STUDENT.dat",ios::in);

78
University Management System

file.seekg(0,ios::beg);
//displays the record content matching with t_stuid from STUDENT.dat data files.
while(file.read((char *)this,sizeof(student)))
{
if(t_stuid==stu_id)
{
gotoxy(16,8);
puts(stu_name);
strcpy(tstu_name,stu_name);
gotoxy(18,10);
puts(stu_strm);
strcpy(tstu_strm,stu_strm);
gotoxy(18,12);
puts(stu_deg);
strcpy(tstu_deg,stu_deg);

}
}
file.close();
file.open("STUDENT.dat",ios::in);
file.seekg(0,ios::beg);
while(file.read((char*)this,sizeof(student)))
{
strcpy(tstu_deg,stu_deg);
if(stu_id==t_stuid)
{
if((strcmp(stu_deg,"B.A-I")==0)||(strcmp(stu_deg,"B.SC-I")==0)||(strcmp(stu_deg,"B.COM-
I")==0))
{
gotoxy(5,14);
cout<<"HONOURS PAPER :";
cin>>thp1;
gotoxy(5,16);
cout<<"HONOURS :";
cin>>thp2;
gotoxy(5,18);
cout<<"SUBSIDIARY I:";
cin>>ts1;
gotoxy(5,19);
cout<<"SUBSSIDIARY II:";
cin>>ts2;
gotoxy(5,20);
cout<<"COMPULSORY";
cin>>tcom;
}
else if((strcmp(stu_deg,"B.A-II")==0)||(strcmp(stu_deg,"B.SC-II")==0)||
(strcmp(stu_deg,"B.COM-II")==0))
{
gotoxy(5,14);
cout<<"HONOURS PAPER :";
cin>>thp3;
gotoxy(5,16);
cout<<"HONOURS :";
cin>>thp4;
gotoxy(5,18);
cout<<"SUBSIDIARY I:";
cin>>ts1;
gotoxy(5,19);
cout<<"SUBSSIDIARY II:";
cin>>ts2;

79
University Management System

gotoxy(5,20);
cout<<"COMPULSORY";
cin>>tcom;
}
else if((strcmp(stu_deg,"B.A-III")==0)||(strcmp(stu_deg,"B.SC-III")==0)||
(strcmp(stu_deg,"B.COM-III")==0))
{
gotoxy(5,14);
cout<<"HONOURS PAPER :";
cin>>thp5;
gotoxy(5,16);
cout<<"HONOURS PAPER:";
cin>>thp6;
gotoxy(5,18);
cout<<"HONUURS PAPER";
cin>>thp7;
gotoxy(5,19);
cout<<"HONOURS PAPER IV:";
cin>>thp8;
gotoxy(5,20);
cout<<"GENERAL KNOWLEDGE";
cin>>tgk;
}
else if((strcmp(stu_deg,"M.A-I")==0)||(strcmp(stu_deg,"M.SC-I")==0)||
(strcmp(stu_deg,"M.COM-I")==0))
{
gotoxy(5,14);
cout<<"PAPER I:-";
cin>>tp1;
gotoxy(5,15);
cout<<"PAPER II:-";
cin>>tp2;
gotoxy(5,16);
cout<<"PAPER III:-";
cin>>tp3;
gotoxy(5,17);
cout<<"PAPER IV:-";
cin>>tp4;
gotoxy(5,18);
cout<<"PAPER V:-";
cin>>tp5;
gotoxy(5,19);
cout<<"PAPER VI:-";
cin>>tp6;
gotoxy(5,20);
cout<<"PAPER VII:-";
cin>>tp7;
gotoxy(5,21);
cout<<"PAPER VIII:-";
cin>>tp8;
}
else if((strcmp(stu_deg,"M.A-II")==0)||(strcmp(stu_deg,"M.SC-II")==0)||
(strcmp(stu_deg,"M.COM-II")==0))
{
gotoxy(5,14);
cout<<"PAPER IX:-";
cin>>tp9;
gotoxy(5,15);
cout<<"PAPER X:-";
cin>>tp10;

80
University Management System

gotoxy(5,16);
cout<<"PAPER XI:-";
cin>>tp11;
gotoxy(5,17);
cout<<"PAPER XII:-";
cin>>tp12;
gotoxy(5,18);
cout<<"PAPER XIII:-";
cin>>tp13;
gotoxy(5,19);
cout<<"PAPER XIV:-";
cin>>tp14;
gotoxy(5,20);
cout<<"PAPER XV:-";
cin>>tp15;
gotoxy(5,21);
cout<<"PAPER XVI:-";
cin>>tp16;
}
}
}
char ch;
do
{
clear(5,23);
gotoxy(5,23);
cout<<"DO YOU WANT TO SAVE THE RECORD (Y/N):-";
ch=getche();
if(ch==0)
return;
ch=toupper(ch);
}while(ch!='N' && ch!='Y');
if(ch=='N')
return;
if(ch=='Y')
{
if((strcmp(tstu_deg,"B.A-I")==0)||(strcmp(tstu_deg,"B.SC-I")==0)||(strcmp(tstu_deg,"B.COM-
I")==0))
{
einfo.add_to_filebaI(t_stuid,tstu_name,tstu_deg,thp1,thp2,ts1,ts2,tcom);
}
else if((strcmp(tstu_deg,"B.A-II")==0)||(strcmp(tstu_deg,"B.SC-II")==0)||
(strcmp(tstu_deg,"B.COM-II")==0))
{
einfo.add_to_filebaII(t_stuid,tstu_name,tstu_deg,thp3,thp4,ts1,ts2,tcom);
}
else if((strcmp(tstu_deg,"B.A-III")==0)||(strcmp(tstu_deg,"B.SC-III")==0)||
(strcmp(tstu_deg,"B.COM-III")==0))
{
einfo.add_to_filebaIII(t_stuid,tstu_name,tstu_deg,thp5,thp6,thp7,thp8,tgk);
}
else if((strcmp(tstu_deg,"M.A-I")==0)||(strcmp(tstu_deg,"M.SC-I")==0)||
(strcmp(tstu_deg,"M.COM-I")==0))
{
einfo.add_to_filemaI(t_stuid,tstu_name,tstu_deg,tp1,tp2,tp3,tp4,tp5,tp6,tp7,tp8);
}
else if((strcmp(tstu_deg,"M.A-II")==0)||(strcmp(tstu_deg,"M.SC-II")==0)||
(strcmp(tstu_deg,"M.COM-II")==0))
{

81
University Management System

einfo.add_to_filemaII(t_stuid,tstu_name,tstu_deg,tp9,tp10,tp11,tp12,tp13,tp14,tp15,tp16);
}
}
}
//supporting function of result
void examinfo::add_to_filebaI(int t_stuid,char t_name[30],char t_deg[30],int t_hp1,int t_hp2,int t_s1,int t_s2,int
t_com)
{
fstream file;
stu_id=t_stuid;
hp1=t_hp1;
hp2=t_hp2;
s1=t_s1;
s2=t_s2;
com=t_com;
strcpy(stu_name,t_name);
strcpy(stu_deg,t_deg);
//append newm record into STUDENT.dat data file.
file.open("RESULTF.dat",ios::out|ios::app);
file.write((char *)this,sizeof(examinfo));
file.close();
}
//suporting function of result
void examinfo::add_to_filebaII(int t_stuid,char t_name[30],char t_deg[30],int t_hp3,int t_hp4,int t_s1,int t_s2,int
t_com)
{
fstream file;
stu_id=t_stuid;
hp3=t_hp3;
hp4=t_hp4;
s1=t_s1;
s2=t_s2;
com=t_com;
strcpy(stu_name,t_name);
strcpy(stu_deg,t_deg);
//append newm record into STUDENT.dat data file.
file.open("RESULTS.dat",ios::out|ios::app);
file.write((char *)this,sizeof(examinfo));
file.close();
}
//suporting function function of result
void examinfo::add_to_filebaIII(int t_stuid,char t_name[30],char t_deg[30],int t_hp5,int t_hp6,int t_hp7,int
t_hp8,int t_gk)
{
fstream file;
stu_id=t_stuid;
hp5=t_hp5;
hp6=t_hp6;
hp7=t_hp7;
hp8=t_hp8;
gk=t_gk;
strcpy(stu_name,t_name);
strcpy(stu_deg,t_deg);
//append newm record into STUDENT.dat data file.
file.open("RESULTT.dat",ios::out|ios::app);
file.write((char *)this,sizeof(examinfo));
file.close();
}
//suporting fuinction of result

82
University Management System

void examinfo::add_to_filemaI(int t_stuid,char t_name[30],char t_deg[30],int t_p1,int t_p2,int t_p3,int t_p4,int


t_p5,int t_p6,int t_p7,int t_p8)
{
fstream file;
stu_id=t_stuid;
p1=t_p1;
p2=t_p2;
p3=t_p3;
p4=t_p4;
p5=t_p5;
p6=t_p6;
p7=t_p7;
p8=t_p8;
strcpy(stu_name,t_name);
strcpy(stu_deg,t_deg);
//append newm record into STUDENT.dat data file.
file.open("RESULTMF.dat",ios::out|ios::app);
file.write((char *)this,sizeof(examinfo));
file.close();
}
//suporting function of result
void examinfo::add_to_filemaII(int t_stuid,char t_name[30],char t_deg[30],int t_p9,int t_p10,int t_p11,int
t_p12,int t_p13,int t_p14,int t_p15,int t_p16)
{
fstream file;
stu_id=t_stuid;
p9=t_p9;
p10=t_p10;
p11=t_p11;
p12=t_p12;
p13=t_p13;
p14=t_p14;
p15=t_p15;
p16=t_p16;
strcpy(stu_name,t_name);
strcpy(stu_deg,t_deg);
//append newm record into STUDENT.dat data file.
file.open("RESULTMS.dat",ios::out|ios::app);
file.write((char *)this,sizeof(examinfo));
file.close();
}
/*This is a important function it displays the result of the student according
to their degree for different different result data fiels*/
void examinfo::resultdisplay_list(void)
{
clrscr();
fstream file;
student stu;
gotoxy(25,1);
cout<<"EXAM RESULT DISPLAY LIST";
gotoxy(25,2);
cout<<"=============================";
int t_stuid;
gotoxy(5,3);
cout<<"enter student id";
cin>>t_stuid;
if(!stu.found_student(t_stuid))
{
gotoxy(5,4);
cout<<"\7 invalid";

83
University Management System

getch();
return;
}
int d1,m1,y1;
struct date d;
getdate(&d);
d1=d.da_day;
m1=d.da_mon;
y1=d.da_year;
gotoxy(62,3);
cout<<"DATE:-"<<d1<<"/"<<m1<<"/"<<y1;
char t_studeg[30];
strcpy(t_studeg,stu.return_degree(t_stuid));
if((strcmp(t_studeg,"B.A-I")==0) || (strcmp(t_studeg,"B.SC-I")==0) || (strcmp(t_studeg,"B.COM-I")==0))
{
gotoxy(1,4);
for(int j=1;j<=79;j++)
cout<<"=";
gotoxy(1,5);
cout<<"ID";
gotoxy(3,5);
cout<<"NAME";
gotoxy(34,5);
cout<<"DEGREE";
gotoxy(48,5);
cout<<"HONOURS";
gotoxy(40,6);
cout<<"PAPER I";
gotoxy(50,6);
cout<<"PAPER II";
gotoxy(65,5);
cout<<"SUBCIDIARY";
gotoxy(60,6);
cout<<"PAPER I";
gotoxy(68,6);
cout<<"PAPER II";
gotoxy(76,5);
cout<<"COMPULSORY";
gotoxy(1,7);
for(j=1;j<=79;j++)
cout<<"=";
file.open("RESULTF.dat",ios::in);
file.seekg(0,ios::beg);
int row=8;
while(file.read((char*)this,sizeof(examinfo)))
{

gotoxy(1,row);
cout<<stu_id;
gotoxy(3,row);
puts(stu_name);
gotoxy(34,row);
puts(stu_deg);
gotoxy(40,row);
cout<<hp1;
gotoxy(50,row);
cout<<hp2;
gotoxy(60,row);
cout<<s1;
gotoxy(70,row);

84
University Management System

cout<<s2;
gotoxy(72,row);
cout<<com;
row++;
if(row>23)
{
row=7;
gotoxy(4,24);
cout<<"PRESS ANY KEY TO CONTINUE...";
getch();
clrscr();
}
gotoxy(1,row);
for(int j=1;j<=79;j++)
cout<<"=";

}
file.close();
}
if((strcmp(t_studeg,"B.A-II")==0)||(strcmp(t_studeg,"B.SC-II")==0)||(strcmp(t_studeg,"B.COM-II")==0))
{
gotoxy(1,4);
for(int j=1;j<=79;j++)
cout<<"=";
gotoxy(1,5);
cout<<"ID";
gotoxy(3,5);
cout<<"NAME";
gotoxy(34,5);
cout<<"DEGREE";
gotoxy(48,5);
cout<<"HONOURS";
gotoxy(40,6);
cout<<"PAPER III";
gotoxy(50,6);
cout<<"PAPER IV";
gotoxy(65,5);
cout<<"SUBCIDIARY";
gotoxy(60,6);
cout<<"PAPER I";
gotoxy(68,6);
cout<<"PAPER II";
gotoxy(76,5);
cout<<"COMPULSORY";
gotoxy(1,7);
for(j=1;j<=79;j++)
cout<<"=";
file.open("RESULTS.dat",ios::in);
file.seekg(0,ios::beg);
int row=8;
while(file.read((char*)this,sizeof(examinfo)))
{
gotoxy(1,row);
cout<<t_stuid;
gotoxy(3,row);
puts(stu_name);
gotoxy(34,row);
puts(stu_deg);
gotoxy(40,row);
cout<<hp3;

85
University Management System

gotoxy(50,row);
cout<<hp4;
gotoxy(60,row);
cout<<s1;
gotoxy(70,row);
cout<<s2;
gotoxy(72,row);
cout<<com;
row++;
if(row>23)
{
row=7;
gotoxy(4,24);
cout<<"PRESS ANY KEY TO CONTINUE...";
getch();
clrscr();
}
gotoxy(1,row);
for(int j=1;j<=79;j++)
cout<<"=";
}
file.close();
}
if((strcmp(t_studeg,"B.A-III")==0)||(strcmp(t_studeg,"B.SC-III")==0)||(strcmp(t_studeg,"B.COM-
III")==0))
{
gotoxy(1,4);
for(int j=1;j<=79;j++)
cout<<"=";
gotoxy(1,5);
cout<<"ID";
gotoxy(3,5);
cout<<"NAME";
gotoxy(34,5);
cout<<"DEGREE";
gotoxy(53,5);
cout<<"HONOURS";
gotoxy(40,6);
cout<<"PAPER V";
gotoxy(50,6);
cout<<"PAPER VI";
gotoxy(60,6);
cout<<"PAPER VII";
gotoxy(70,6);
cout<<"PAPER VIII";
gotoxy(78,5);
cout<<"G.K";
gotoxy(1,7);
for(j=1;j<=79;j++)
cout<<"=";
file.open("RESULTT.dat",ios::in);
file.seekg(0,ios::beg);
int row=8;
while(file.read((char*)this,sizeof(examinfo)))
{
gotoxy(1,row);
cout<<t_stuid;
gotoxy(3,row);
puts(stu_name);
gotoxy(34,row);

86
University Management System

puts(stu_deg);
gotoxy(40,row);
cout<<hp5;
gotoxy(50,row);
cout<<hp6;
gotoxy(60,row);
cout<<hp7;
gotoxy(70,row);
cout<<hp8;
gotoxy(72,row);
cout<<gk;
row++;
if(row>23)
{
row=7;
gotoxy(4,24);
cout<<"PRESS ANY KEY TO CONTINUE...";
getch();
clrscr();
}
gotoxy(1,row);
for(int j=1;j<=79;j++)
cout<<"=";
}
file.close();
}
if((strcmp(t_studeg,"M.A-I")==0)||(strcmp(t_studeg,"M.SC-I")==0)||(strcmp(t_studeg,"M.COM-I")==0))
{
gotoxy(1,4);
for(int j=1;j<=79;j++)
cout<<"=";
gotoxy(1,5);
cout<<"ID";
gotoxy(3,5);
cout<<"NAME";
gotoxy(34,5);
cout<<"DEGREE";
gotoxy(53,5);
cout<<"MASTER DEGREE";
gotoxy(40,6);
cout<<"I";
gotoxy(44,6);
cout<<"II";
gotoxy(48,6);
cout<<"III";
gotoxy(52,6);
cout<<"IV";
gotoxy(56,6);
cout<<"V";
gotoxy(60,6);
cout<<"VI";
gotoxy(64,6);
cout<<"VII";
gotoxy(68,6);
cout<<"VIII";
gotoxy(1,7);
for(j=1;j<=79;j++)
cout<<"=";
file.open("RESULTMF.dat",ios::in);
file.seekg(0,ios::beg);

87
University Management System

int row=8;
while(file.read((char*)this,sizeof(examinfo)))
{
gotoxy(1,row);
cout<<t_stuid;
gotoxy(3,row);
puts(stu_name);
gotoxy(34,row);
puts(stu_deg);
gotoxy(40,row);
cout<<p1;
gotoxy(44,row);
cout<<p2;
gotoxy(48,row);
cout<<p3;
gotoxy(52,row);
cout<<p4;
gotoxy(56,row);
cout<<p5;
gotoxy(60,row);
cout<<p6;
gotoxy(64,row);
cout<<p7;
gotoxy(68,row);
cout<<p8;
row++;
if(row>23)
{

row=7;
gotoxy(4,24);
cout<<"PRESS ANY KEY TO CONTINUE...";
getch();
clrscr();
}
gotoxy(1,row);
for(int j=1;j<=79;j++)
cout<<"=";
}
file.close();
}
if((strcmp(t_studeg,"M.A-II")==0)||(strcmp(t_studeg,"M.SC-II")==0)||(strcmp(t_studeg,"M.COM-
II")==0))
{
gotoxy(1,4);
for(int j=1;j<=79;j++)
cout<<"=";
gotoxy(1,5);
cout<<"ID";
gotoxy(3,5);
cout<<"NAME";
gotoxy(34,5);
cout<<"DEGREE";
gotoxy(53,5);
cout<<"MASTER DEGREE";
gotoxy(40,6);
cout<<"IX";
gotoxy(44,6);
cout<<"X";
gotoxy(48,6);

88
University Management System

cout<<"XI";
gotoxy(52,6);
cout<<"XII";
gotoxy(56,6);
cout<<"XIII";
gotoxy(60,6);
cout<<"XIV";
gotoxy(64,6);
cout<<"XV";
gotoxy(68,6);
cout<<"XVI";
gotoxy(1,7);
for(j=1;j<=79;j++)
cout<<"=";
file.open("RESULTMS.dat",ios::in);
file.seekg(0,ios::beg);
int row=8;
while(file.read((char*)this,sizeof(examinfo)))
{
gotoxy(1,row);
cout<<t_stuid;
gotoxy(3,row);
puts(stu_name);
gotoxy(34,row);
puts(stu_deg);
gotoxy(40,row);
cout<<p9;
gotoxy(44,row);
cout<<p10;
gotoxy(48,row);
cout<<p11;
gotoxy(52,row);
cout<<p12;
gotoxy(56,row);
cout<<p13;
gotoxy(60,row);
cout<<p14;
gotoxy(64,row);
cout<<p15;
gotoxy(68,row);
cout<<p16;
row++;
if(row>23)
{
row=7;
gotoxy(4,24);
cout<<"PRESS ANY KEY TO CONTINUE...";
getch();
clrscr();
}
gotoxy(1,row);
for(j=1;j<=79;j++)
cout<<"=";
}
file.close();
}
getch();
}

void performance::foundation(void)

89
University Management System

gotoxy(65,2);
cout<<"<0>=EXIT";
gotoxy(3,3);
for(int i=1;i<=76;i++)
cprintf("");
textbackground(BLACK);
textcolor(BLACK+BLINK);
textbackground(WHITE);
_setcursortype(_NOCURSOR);//changes cursor type
gotoxy(30,3);
cprintf("FOUNDATION");
textcolor(LIGHTGRAY);
textbackground(BLACK);
int d1,m1,y1;
struct date d;//for extracting system date
getdate(&d);
d1=d.da_day;
m1=d.da_mon;
y1=d.da_year;
gotoxy(5,4);
cout<<"DATE:-"<<d1<<"/"<<m1<<"/"<<y1;
gotoxy(5,5);
textcolor(GREEN+BLINK);
cout<<"\t \t \t \t OUR MISSION";
gotoxy(5,6);
textcolor(GREEN+BLINK);
cout<<" Global Leadership In Human Development Excellence In Education";
gotoxy(5,7);
textcolor(GREEN+BLINK);
cout<<"& Healthcare Universities since its inception, five decades ago,";
gotoxy(5,8);
textcolor(GREEN+BLINK);
cout<<"has viewed Community and Social development as its core focus.";
gotoxy(5,9);
textcolor(GREEN+BLINK);
cout<<"The Foundation was primarily set up to sanctify this mission";
gotoxy(5,10);
textcolor(GREEN+BLINK);
cout<<"and to re-affirm its commitment to social development in";
gotoxy(5,11);
textcolor(GREEN+BLINK);
cout<<"the fields of Education, Healthcare, Science, Culture,";
gotoxy(5,12);
textcolor(GREEN+BLINK);
gotoxy(5,13);
textcolor(GREEN+BLINK);
cout<<"Heritage and Sports.";
cout<<"The Foundation is also an effort to reach out to";
gotoxy(5,14);
textcolor(GREEN+BLINK);
cout<<"like-minded individuals and organizations, to join ";
gotoxy(5,15);
textcolor(GREEN+BLINK);
cout<<" them in their endeavour to provide the much-needed impetus ";
gotoxy(5,16);
textcolor(GREEN+BLINK);
cout<<"to a few globally relevant development issues.";
gotoxy(5,17);

90
University Management System

textcolor(GREEN+BLINK);
cout<<"The Foundation Is registered as a charitable ";
gotoxy(5,18);
textcolor(GREEN+BLINK);
cout<<"trust and the Commissioner of Income Tax has ";
gotoxy(5,19);
textcolor(GREEN+BLINK);
cout<<"granted recognition to It.Donations made to the";
gotoxy(5,20);
textcolor(GREEN+BLINK);
cout<<"foundation are exempt under section BOG of the Income Tax Act, 1961.";
gotoxy(5,21);
textcolor(GREEN+BLINK);
cout<<" Global Leadership in Human Development. Excellence ";
gotoxy(5,22);
textcolor(GREEN+BLINK);
cout<<"in Healthcare and Education";
}

void main(void)
{

main_menu ob_menu;
int gdriver = DETECT,gmode,errorcode;
char pass[10],ch;
int i=0;
initgraph(&gdriver,&gmode,"c:\\tc\\bgi");
ob_menu.first_screen();
ab: gotoxy(4,20);
setcolor(7);
cout<<"ENTER THE PASSWORD :-";
do
{
ch=getch();
gotoxy(25+i,20);
cout<<"";
pass[i]=ch;
i++;
if(i>8)
{
i=0;
gotoxy(6,24);
cout<<"PASSWORD NOT GREATER THAN 8 CHARACTER LONG";
getch();
clrscr();
goto ab;
}
}while(ch!='\r');
i--;
pass[i]='\0';
closegraph();
/*compare the password*/
if(strcmp(strupr(pass),"HELLO")==0)
{
clrscr();
int driver,mode,errorcode;
driver=DETECT;
initgraph(&driver,&mode,"c:\\tc\\bgi");
ob_menu.help();
closegraph();

91
University Management System

ob_menu.control_menu();
getch();
}
else
{
clrscr();
int driver,mode,errorcode;
driver=DETECT;
initgraph(&driver,&mode,"c:\\tc\\bgi");
gotoxy(10, 15);
setcolor(7);
cout<<"WRONG PASSWORD!";
}
getch();
closegraph();

Output Screens
There will be different types of output screen such as help screen, main menu for listing
the account holder records with their balance, for creating new accounts, displaying individual
accounts details, displaying daily transaction reports and monthly report of bank/individuals and
for modifying any account holder balances, closing their account and finally to exit from the
Banking Accounting system.

92
University Management System

93
University Management System

94
University Management System

95
University Management System

96
University Management System

97
University Management System

98
University Management System

99
University Management System

100
University Management System

101
University Management System

102
University Management System

103
University Management System

104
University Management System

105
University Management System

106
University Management System

107
University Management System

108
University Management System

109
University Management System

Training of Personnel Involved with the System

Those who are directly or indirectly related with system development work
must know in detail what their roles will be, how they can make the efficient use of
the system and what the system will do or not do for them. Here both the employees
and users need training.

System Operator’s Training:

Running of the system successfully depend on the personnel working on that


system. So their training must ensure that they are able to handle all possible
operations, both routine and extra-ordinary in nature.

110
University Management System

Keeping the above objectives in mind system operator’s are trained with some
fundamental topics as:
 How to turn the equipment on and use it,
 How to power off and a knowledge what constitutes normal operation,
 Different types of malfunctioning, how to recognize them, and what steps should be
taken whenever they arise.
 As part of their training, operators are given both a troubleshooting list that identifies
possible problems and remedies for them, as well as the names and telephone numbers
of individuals to contact when unexpected or unusual problems arise.
 Familiarization with run procedures, which involves working through the sequence of
activities needed to use a new system on an ongoing basis.

User’s Training:
User training deals with the operations of the system itself, with proper attention given
to the data handling techniques.

Users are trained in methods of entering transactions, editing, formulating inquiries, and view
reports. Users are familiarized with simple systems maintenance activities.

Training Methods

In-house Training: The main advantage of offering in-house training is that instructions can
be tailored according to the requirements of the organization.
Organization can involve more personnel in the training program because this type of training
method is more economical.

Conversion Methods
Parallel System: For conversion of old system to new one we employ parallel system to
run both the system in parallel. Under this approach, users continue to operate their old system
as well as they also start using the new system.

This method is safest one because it ensures that in case of any problems in using the
new system, the organization can still fall back to the old system without loss of time and
money.

111
University Management System

After the system conversion is completed using parallel system, the conversion plan
starts. During the pre-implementation stages, when the conversion is being planned, we were
prepared a list of all tasks, including the following:

 List of all files that are required during conversion


 Identify all data required to build new files during conversion
 Identify all controls to be made during conversion
 Assign the responsibility for each task.
And now at this stage we convert all the above conversion plans into operation one by one.

System Maintenance
System maintenance is actually the implementation of the post-implementation review
plan. So, at this stage we implement the following maintenance area:

i) Administrative Maintenance: The following activities are maintained under this


maintenance:
 User objective maintenance: This is an extremely critical area since it may be possible
that over the period of time either the system does not meet the initial objectives of
the user or the user objectives get changed as a result of the changes in the overall
objectives of the organization.
 Operating costs and benefits maintenance: Under this maintenance, current budgets
are designed to manipulate the costs and savings of the system.

ii) Personnel Requirement Maintenance: Under this maintenance, all activities involving
system personnel and staff members associated with the system are maintained. That is,
 Maintained the performance of personnel objectives with current performance levels.
 Maintained training performance through testing and conducting interviews.

iii) Hardware Maintenance: The hardware of the new system is also maintained including
servers, terminals, and communication networks. The main target is a comparison of
current performance specifications with design specifications.

For implementing the overall post-implementation plan, actually we employ little efforts,
because most of essential tasks that are maintained in this stage are already performed with
more efficiently. For example:

 During system development the user’s requirements was defined more accurately.

112
University Management System

 System documentation was prepared in a better way.


 Processing logic was also designed using more effective way.
 Existing tools and techniques are better utilized.
 System engineering processes are managed effectively.

Testing

Testing is the process of exercising or evaluating a system or system component by


manual or automated means to verify that it satisfies the specified requirements. Normally,
most of the testing and debugging is done after the system has been implemented. A large
percentage of errors are discovered during testing originates in the requirement and design
phase. The techniques that have been proposed for unit testing include the following:

1. Path testing: Each possible path from input to output is traversed once.
2. Branch testing: Each path must be traversed at least once.
3. Functional testing: Each, functional decomposition is tested at least once.
4. Special value testing: Testing for all values assumed to cause problems.

All the modules that have been developed before and tested individually are put together
(integrated) in this phase and tested as a whole system. After doing this in the project will be
almost ready to be delivered.

System Security Measures

For adopting some security measures for the proposed system, first we have to identify
all the system security goals:

 Preventing malicious damage to files and system


 Preventing accidental damage to files and system
 Protecting the integrity and confidentiality of data
 Preventing unauthorized access to the system
 Providing appropriate disaster-recovery system so the server can be restored

So once we have defined our security goals, we can safely decide which security measures
make sense for this new system. Some of the measures are:

113
University Management System

 The server is physically secure from theft and damage.


 In addition to keep the server in a physically secure area, we may want to keep it on a
separate network with restricted access to enhance the server’s security.
 Use of power-conditioning device to clean the electrical power coming into the server
and to keep the server to running long enough so an orderly shutdown can be
performed.
 Use of the entire audit trial and logging features available in the operating system.
Because the audit trail records the details of every user action on the system, whether it
was successful or not.
 Control access to sensitive files and directories.
 Inform all customers about security policies and their duties and responsibilities as
users.
 Prepare a plan that can execute when the new system is under attack.
 Provide virus protection for all employees, and scan all files on servers and workstations
daily.

Cost and Benefit

System cost can be sub-divided into the following categories:


1. Development Cost
2. Operating Cost
3. Intangible Cost

Development Cost
 The Salaries of the system analyst and the computer programmer who designed the
entire computerized system.
 Cost of commenting and preparing data files and preparing system manuals and other
supportive documents.
 Cost of preparing new or expanded computer facilities.
 Cost of testing and documenting the system, Training employees and other standard
cost.
 Cost of stationary, system maintenances etc.

Operating Cost
 Cost of Hardware/Software, Rental or Depreciation cost.

114
University Management System

 The salaries of the technical person such as computer operator,


 Other data processing personnel who will operate the new system.
 The salaries of system analyst and computer programmers who will perform the
system maintenance function.
 The cost of input data preparation and control.
 Cost of data processing suppliers.
 Cost of maintaining the proper physical facilities, including power, air- conditioning,
appropriate furniture, power backup facilities etc.
 Overhead Charges of the business firms.
 Cost of storing the data in machine code form.
 Launching cost like staff training, file communication and system training.

Intangible cost
 The development of the system may disrupt the activities of an organization and
cause a loss of employee productivity.
 Comparativeness with the other firm with respect to the productivity due to
computerization.
 Customer sales and goodwill may be lost by error made during the installation of new
system.
Benefits
The benefits which results from developing new or improved information systems that
utilizes the resources can be subdivided as follows:

1. Tangible Benefits.
2. Intangible Benefits

Tangible Benefits
Tangible Benefits are those benefits that can be accurately measured and are
directly related to the introduction of a new system such as decrease in the data
processing cost.

Intangible Benefits
Intangible Benefits are more difficult to estimate and justify usually requiring the skill of
the particular management concern, the cost of input data preparation and control.

Benefits that can results from the development of the computerized system are
summarized below.

115
University Management System

 Increase in sales and profits.


 Decrease in data processing costs.
 Decrease in operating costs.
 Decrease in required investments.
 Increase operational ability and efficiency.
 New and improved information availability.
 Improved abilities in computation and analysis.
 Reduction in employees such as clerical aspects.
 Elimination of some specific costs, e.g., postage, stationary, office machinery,
etc.
 Reduction in cost and effort due to improved procedures such as data capture
and avoiding the data validation.

Pert Chart

24th April2010

Writing Manual
30th Mar 2010 9th Apr2010 20th June 2010

10th May2010 2nd Junel2010 Finish


Start Analysis Design Coding
12th June2010
16th May2010
th
14 Apr 2010 Testing &
Design Review Implementation
Feasibility Study

Gantt Chart

30th March 11th April 20th April 2nd May 12th June 20th June
2010 2010 2006 2010 2010 2010

116
University Management System

Start

Analysis

Finish

Feasibility
Study

Design

Design
Writing Review Manual
117
University Management System

Coding
Testing &
Implementation

Future Scope of the Project

Normally a Banking Organization covers different area of business. However this project
UNIVERSITY MANAGMENT SYSTEM only covers the implementation of the student, college’s
records and their various activities. The data accumulated in this project is used periodically to
provide different types of managerial information.

The future applications of this UNIVERSITY MANAGEMENT SYSTEM are:

I) This overall project is basically written in function and can be used in conjunction
with other program, for future development for UNIVERSITY system.

118
University Management System

II) We have provided many data function through which any one can know about any
STUDENT/COLLEGE giving COLLEGE/STUDENT number.
III) The project is using the modern trend OOPs that gives a better design to the
software, which help in maintaining code in terms of reusability, modifiability, etc.
These attributes a quit wanting in today’s complex software scenario. OOPs giving a
better designs objective taken this problem and provide better design objective.
IV) This software is design with OOPs so we chosen C++ language, which provide all
features which will be needed in future. This software is having sounding economic
aspect with the motion of controlling the local market.
V) Cost of our project is comparatively low.

After using UNIVERSITY MANAGMENT SYSTEM the user will find that in the package provided to
them has some of the facilities are slightly different than any other packages. This project omits
something or adds some additional minor details as and when required by the user.

Bibliography

At the end, the following bibliography is in no way complete. However it is an attempt to


list a few number of sources and references when we have used for the development & design
of the project in this elegant form.

Title of the Book Author/Publisher

Object-Oriented Programming with c++ Robert Lafore/Techmedia

C++: The Complete Reference Herbert Schieldt/Tata McGraw

Hill

Mastering C++ Venugopal, Rajkumar,


Ravishankar
/Tata McGraw Hill

119
University Management System

120

You might also like