Professional Documents
Culture Documents
School Fees management system
School Fees management system
Introduction
Programming concept
Language introduction
Data flow diagram.
Header file.
User defined function.
Codes.
Hardware requirement.
User interface.
Data storing method.
Advantages & disadvantages.
Conclusion.
Bibliography.
Introduction
For solving above problem we follow the software engineering’s concept of modeling technique.
We use water fall model.
Water fall model provide following problem solving technique.
Analysis.
Design
Coding.
Testing
Implementation.
The language use to construct the employee system is C. We have use C because
we all are quite familiar with it. It is reliable, simple and easy to use out of the
dozen of languages Available. C is a high level language that provides high level
programming with efficiency because it has the power of the machine language.
C is general-purpose structured programming language. Its instructions consists
of English terms that resemble algebraic Expressions of augmented by certain
English Keywords such as if, Else, for do & while.
C bridges the gap between conventional high level languages and machine
language. This allows C to be used for System programming as well as the
application programming. C is characterize by the ability to write very concise
Source program due in the part of the large no. of operator within the language it
has relatively small instruction set, though actual implementation includes
extensive library functions, which enhances the basic functions. Furthermore,
the language encourages the
user to write additional library functions of their own. Thus, the user can easily
extent the features and capabilities of the language. Another important
characteristics of C is that its program are highly portable, even more so then
with the other langue the reason for this is that C relegates most computer
dependent features to its library. Thus, C accompanied by its own sets of library
functions, which are written for the particular characteristics of the host
computer. These library functions are relatively standardized, however, and each
individual library function it generally accessed in the same manner from one
version of C to another. Therefore, Most C program can be processed on different
computers with little or no alteration.
Header files
In this project we use following header files.
#include <iostream>
#include <windows.h>
#include <fstream>
#include <cstring>
#include <cstdlib>
#include <cstdio>
#include <cctype>
#include <conio.h>
#include <ctime>
#include <dos.h>
#include <iomanip>
int i,j,li,lp,rec,valid;
COORD coord;
coord.X = x;
coord.Y = y;
SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE), coord);
void help();
//**************************** **********
// GLOBAL VARIABLE DECLARATIONS
//**************************** **********
//int i,j,li,lp;
char ch,choice;
//**************************** ********
//**************************** ********
class DRAW
public :
void BOX(int,int,int,int,char) ;
};
//**********************************************************
//**********************************************************
class FEE
{
private :
int Class ;
void DISPLAY(int) ;
public :
void ADDITION(void) ;
void MODIFICATION(void) ;
void FEE_SLIP(void) ;
void LIST(void) ;
void HELP(void);
}fee ;
//****************************************
//****************************************
void mainmenu()
system("cls");
for(li=30;li<=50;li++)
gotoxy(li,14);
Sleep(30);
printf("*");
for(li=50;li>=30;li--)
gotoxy(li,30);
Sleep(30);
printf("*");
for(lp=15;lp<30;lp++)
gotoxy(30,lp);
Sleep(100);
printf("|");
for(lp=29;lp>=15;lp--)
gotoxy(50,lp);
Sleep(100);
printf("|");
gotoxy(15,10);
printf("Press the corresponding Keys for the desired action");
gotoxy(35,16);
gotoxy(35,19);
printf("M: MODIFY");
gotoxy(35,22);
printf("L: LIST");
gotoxy(35,25);
printf("H: HELP");
gotoxy(35,28);
printf("Q: QUIT");
choice=getch();
ch=toupper(choice);
switch(ch)
case'F':fee.FEE_SLIP();
break;
case'M':fee.MODIFICATION();
break;
case'L':fee.LIST();
break;
case'H':fee.HELP();
break;
case'Q':exit(0);
break;
default:gotoxy(33,40);
getch();
mainmenu();
//************************************
//************************************
gotoxy(column1,row) ;
cout <<c ;
}
}
//**********************************************************
//**********************************************************
gotoxy(column,row1) ;
cout <<c ;
//**********************************************************
//**********************************************************
void DRAW :: BOX(int column1, int row1, int column2, int row2, char c)
char ch=218 ;
if (c == ch)
{
c1=218 ;
c2=191 ;
c3=192 ;
c4=217 ;
l1 = 196 ;
l2 = 179 ;
else
c1=c ;
c2=c ;
c3=c ;
c4=c ;
l1 = c ;
l2 = c ;
gotoxy(column1,row1) ;
cout <<c1 ;
gotoxy(column2,row1) ;
cout <<c2 ;
gotoxy(column1,row2) ;
cout <<c3 ;
gotoxy(column2,row2) ;
cout <<c4 ;
column1++ ;
column2-- ;
LINE_HOR(column1,column2,row1,l1) ;
LINE_HOR(column1,column2,row2,l1) ;
column1-- ;
column2++ ;
row1++ ;
row2-- ;
LINE_VER(row1,row2,column1,l2) ;
LINE_VER(row1,row2,column2,l2) ;
//**********************************************************
//**********************************************************
fstream file ;
file.open("FEE.DAT", ios::in) ;
if (!file.fail())
return ;
file.close() ;
file.open("FEE.DAT", ios::app) ;
for (int i=1; i<=12; i++)
Class = i ;
tuition = 0.0 ;
ac = 0.0 ;
science = 0.0 ;
computer= 0.0 ;
activity= 0.0 ;
file.close() ;
MODIFY_RECORD(12,450,50,60,60,50) ;
MODIFY_RECORD(11,450,50,60,60,50) ;
MODIFY_RECORD(10,350,50,30,60,50) ;
MODIFY_RECORD(9,350,50,20,60,50) ;
MODIFY_RECORD(8,300,50,20,40,50) ;
MODIFY_RECORD(7,300,50,20,40,50) ;
MODIFY_RECORD(6,300,50,20,40,50) ;
MODIFY_RECORD(5,250,50,0,40,40) ;
MODIFY_RECORD(4,250,50,0,40,40) ;
MODIFY_RECORD(3,250,50,0,40,40) ;
MODIFY_RECORD(2,250,50,0,40,40) ;
MODIFY_RECORD(1,250,50,0,40,40) ;
}
//**********************************************************
//**********************************************************
system("cls") ;
DRAW d ;
// textcolor(MAGENTA);
d.BOX(1,2,80,24,218) ;
gotoxy(27,3) ;
d.LINE_HOR(2,79,4,196) ;
gotoxy(5,5) ;
d.LINE_HOR(2,79,6,196) ;
d.LINE_HOR(2,79,22,196) ;
float total ;
int row=8 ;
fstream file ;
file.open("FEE.DAT", ios::in) ;
cout <<Class ;
gotoxy(23,row) ;
cout <<total ;
row++ ;
file.close() ;
gotoxy(5,23) ;
getch() ;
mainmenu();
//**********************************************************
//**********************************************************
fstream file ;
file.open("FEE.DAT", ios::in) ;
if (Class == tclass)
{
gotoxy(5,5) ;
gotoxy(5,7) ;
cout <<"~~~~~~~~~~~~" ;
gotoxy(5,8) ;
gotoxy(5,9) ;
gotoxy(5,10) ;
gotoxy(5,11) ;
gotoxy(5,12) ;
break ;
file.close() ;
//**********************************************************
//**********************************************************
void FEE :: MODIFY_RECORD(int tclass, float ttution, float tac, float
fstream file ;
file.open("FEE.DAT", ios::in) ;
fstream temp ;
temp.open("temp.dat", ios::out) ;
file.seekg(0,ios::beg) ;
while (!file.eof())
if (file.eof())
break ;
if (tclass == Class)
Class = tclass ;
tuition = ttution ;
ac = tac ;
science = tscience ;
computer= tcomputer ;
activity= tactivity ;
else
temp.write((char *) this, sizeof(FEE)) ;
file.close() ;
temp.close() ;
file.open("FEE.DAT", ios::out) ;
temp.open("temp.dat", ios::in) ;
temp.seekg(0,ios::beg) ;
while (!temp.eof())
valid = 0 ;
gotoxy(5,27) ;
getch() ;
} while (!valid) ;
if (strlen(t1) == 0)
modified-- ;
ttution = tuition ;
gotoxy(20,17) ;
cout <<ttution ;
do
{
valid = 1 ;
gotoxy(5,27) ;
gotoxy(26,18) ;
gets(t1) ;
t2 = atof(t1) ;
tac = t2 ;
if (t1[0] == '0')
return ;
if (strlen(t1) == 0)
break ;
valid = 0 ;
gotoxy(5,27) ;
getch() ;
} while (!valid) ;
if (strlen(t1) == 0)
modified-- ;
tac = ac ;
gotoxy(26,18) ;
cout <<tac ;
do
valid = 1 ;
gotoxy(5,27) ;
gotoxy(19,19) ;
gets(t1) ;
t2 = atof(t1) ;
tscience = t2 ;
if (t1[0] == '0')
return ;
if (strlen(t1) == 0)
break ;
valid = 0 ;
gotoxy(5,27) ;
getch() ;
} while (!valid) ;
if (strlen(t1) == 0)
{
modified-- ;
tscience = science ;
gotoxy(19,19) ;
cout <<tscience ;
do
valid = 1 ;
gotoxy(5,27) ;
gotoxy(19,20) ;
gets(t1) ;
t2 = atof(t1) ;
tcomputer = t2 ;
if (t1[0] == '0')
return ;
if (strlen(t1) == 0)
break ;
valid = 0 ;
gotoxy(5,27) ;
getch() ;
}
} while (!valid) ;
if (strlen(t1) == 0)
modified-- ;
tcomputer = computer ;
gotoxy(19,20) ;
cout <<tcomputer ;
do
valid = 1 ;
gotoxy(5,27) ;
gotoxy(19,21) ;
gets(t1) ;
t2 = atof(t1) ;
tactivity = t2 ;
if (t1[0] == '0')
return;
if (strlen(t1) == 0)
break;
{
valid = 0 ;
gotoxy(5,27) ;
getch() ;
} while (!valid) ;
if (strlen(t1) == 0)
modified-- ;
tactivity = activity ;
gotoxy(19,21) ;
cout <<tactivity ;
if (!modified)
mainmenu();
gotoxy(5,27) ;
do
gotoxy(5,25) ;
ch = getche() ;
if (ch == '0')
return ;
ch = toupper(ch) ;
return ;
MODIFY_RECORD(tclass,ttution,tac,tscience,tcomputer,tactivity);
gotoxy(5,27) ;
gotoxy(5,29) ;
getch() ;
mainmenu();
//**********************************************************
//**********************************************************
system("cls") ;
do
valid = 1 ;
gotoxy(5,25) ;
gotoxy(5,5) ;
gets(t1) ;
t = atoi(t1) ;
tclass = t ;
if (strlen(t1) == 0)
return ;
valid = 0 ;
gotoxy(5,25) ;
getch() ;
} while (!valid) ;
char name[26] ;
do
gotoxy(5,25) ;
valid = 1 ;
gotoxy(5,7) ;
mainmenu();
void FEE::HELP()
system("cls");
cout<<"3. View the fee structure of the school in the form of alist"<<endl;
cout<<"1. FEE SLIP: This function displays the fee slip for a givenstudent"<<endl;
cout<<"2. MODIFY: This function modifies the fee structure for a give class."<<endl;
cout<<" The user can change the fees for various fields"<<endl;
cout<<"3. LIST: This function displays the list of total fees for all the"<<endl;
getch();
mainmenu();
}
//**********************************************************
//**********************************************************
int main()
FEE fee;
fee.ADDITION();
system("cls");
for(i=10;i<71;i++)
gotoxy(i,15);
Sleep(30);
printf("/");
for(i=70;i>=10;i--)
gotoxy(i,22);
Sleep(30);
cout<<" / ";
for(j=16;j<=21;j++)
gotoxy(10,j);
Sleep(100);
printf("-");
for(j=21;j>=16;j--)
gotoxy(70,j);
Sleep(100);
printf("-");
gotoxy(16,17);
gotoxy(12,20);
printf(" codeincodeblock.blogspot.com");
getch();
mainmenu();
return 0;
}
Hard ware requirements
User interface
Using c file handling we store data, retrieve it and access it. We use
fprintf() for storing data and fscanf() for fetching data.
Both are very powerful function provided by standard input output
library.
This project save data in “Emp.xls” file, which also accessible by ms
excel. This stored in present working directory.
Advantages and disadvantages
Conclusion