Assignment: Foundation of Computing
Assignment: Foundation of Computing
FOUNDATION OF COMPUTING
CSE-202
CONTENTS
ACKNOWLEDGEMENT
INTRODUCTION
o #
o (a)Requirement analysis
# Intro about C program
Problem definition
o Source coding
o # TESTING
! CONFIGURATION OF SYSTEM
! DOCUMENT OF PROJECT
! Program coding
! CONCLUSION
ACKNOWLEDGEME
NT
There is always a sense of gratitude which one expresses
to others for their helpful and needy services they render
during all phases of life. I would like to do it as I really
wish to express my gratitude towards all those who have
been helpful tome in getting this mighty task of Project
Report.
Finally, I would like to thank Mr Sanjay Sood Sir and
other faculty members of wizards system for their
cooperation to develop this term paper
AnKuR sInGh
Introduction
During this phase, the analyst and user come
to a detailed agreement on what function the
proposed system how to perform. It is divided
into two parts:
(1) Requirement Determination
(2) Requirement Specification
REQUIREMENT
ANALYSIS
The final output is the software requirement
specification document. For smaller problems that
can easily be comprehended, the specification
activity might come after the entire analysis is
complete. However, it is more likely that problem
analysis and specifications are done concurrently.
An analyst typically will analyze some parts of the
problem and then the requirements for that part.
Problem analysis and requirement specification
activities overlap, with movement from both
activities to the other. A consequence of this is that
it is relatively less impartment to model
“completely”, compared to specify completely
INTRODUCTION
PROBLEM DEFINITION
SOURCE CODING
The goal of the coding or programming phase is to translate the design
of the system produced during the design phase into code in a given
programming language which can be executed by a computer and that
performs the computation specific by the design. For a given design, the
aim is to implement the design in the best possible manner. The coding
face affect both testing and maintenance profoundly. As we saw earlier,
the time spent in coding is a small percentage of the major percentage.
Thus it should be clear that the goal during coding should not be reduce
the implementation cost, but the goal should be the reduce the cost of
later phases, even if it means that the cost of this phase to increase.
TESTING
During testing the program to be executed with a set of test cases and the
output of the program for the test cases is evaluated to determine if the
program is performed as expected. Due to its approach dynamic testing
can only ascertain the presence of errors in the program the exact nature
of the errors is not usually decided by testing. Testing forms the first step
in determine the errors in program. Clearly the success of testing in
revealing errors in the program depends critically on the test cases.
Testing a large system is a complex activity and like any complex
activity it has to be broken into smaller activies
FUTURE SCOPE
Future scope of this project can be for a long time. Because it is created
in form of modules. It is flexible to fulfill the future requirement because
any module can be modified according to the future needs & in this
project is dynamic; it can handle the new range of data
(HARDWARE&SYSTEM) 810-E
MOTHER BOARD
PROCESSOR P-111 933 MHZ
RAM 256 MB
HARD DISK 40 GB
CD-ROM DRIVE 52 X
MOUSE SCROLLING
FLOPPY DRIVE 1.44 MB
KEYBOARD 104 KEYS
MODEM 56.6 KBPS
PRINTER HP 640-C DESK JET
OPERATING SYSTEM WINDOW-xp
FRONT END C++
Operations Performed by Student Management System
Following operations are performed by Student Management System
a) Addition of records for new students in Student File.
b) Modification of existing records in Student File.
c) Registration of students in Student file.
d) Reports(screen/Printer): this will show following reports
i. Listing of all students
ii. Record of a particular Student
iii. DMC of a student
e) Deleting the records of a student.
Protected
Data
-
-
-
-
Public:
Function
-
-
-
-
1) Void input ( ):- This function reads the following protected data members of file via
keyboard.
Int age;
Long ph;
Char
Fname[20],name[20],cla[10],add[20],city[13],stream[13],rn[13];
Int rollno, m1, m2, m3, m4, total, ave;
2) Void registration( ) :- This function reads the following protected data members from the
disc & display the registration from:
1. char
name[20],cla[10],stream[13],add[20],city[13],n[13];
2. int ph;
3) Void output ( ) :- This function reads the following protected data members from disk:
int m1,m2,m3,m4,total,ave,age;
char name[20];
& display the output.
4) Void report ( ) :- This function generates the following reports:
1. Searches the record of a particular student according to
a. roll no
b. name
2. Gives the report of all the students.
3. Produces the DMC of a particular student.
5) Void cancel ( ) :- This function deletes the record of a particular student according to the
age of the student.
6) Void modify ( ) :- This function is used to modify an existing record.
7) Void graph ( ) :- This function is used to invoke the graphics mode
PROGRAM CODE
/* WELCOME TO THE PROJECT 'STUDENT DATA MANAGEMENT SYSYEM'
#include<conio.h>
#include<process.h>
#include<fstream.h>
#include<string.h>
#include<stdio.h>
#include<dos.h>
class student
{
private:
public:
};
if((x*100/y)>74)
return('A');
else
if((x*100/y)>60)
return('B');
else
if((x*100/y)>33)
return('C');
else
return('E');
t=(a+b+c+d+e);
return (t);
float p=0;
p=(z*100)/410;
return(p);
struct studres
int clas;
char s;
int rollno;
char name[30];
char fatername[30];
char teachname[30];
int engmark;
int matmark;
int phymark;
int chemark;
int commark;
int total;
float percentage;
}stdres;
struct temp
int roll;
char name[30];
int clas;
char sec;
int total;
}temp;
void create();
void add();
void search();
void modify();
void merit();
void merit1();
void delet();
void menu();
void main()
clrscr();
textbackground (PINK);
gotoxy(20,6);
gotoxy(10,10);
getch();
clrscr();
void create()
clrscr();
char ans;
fstream result;
textbackground (PINK);
gotoxy(20,6);
gotoxy(10,10);
cin>>ans;
if(ans != 'N' || ans != 'n')
result.open("result.dat",ios::out|ios::binary);
result.close();
menu();
void add()
top:
clrscr();
textbackground (PINK);
int max1=100,max2=70,kar,l,m;
char ch,n;
cout<<"CLASS:";
gotoxy (16,1);
cout<<"SECTION:";
gotoxy(31,1);
cout<<"ROLL NO:";
gotoxy(47,1);
cout<<"STUDENT'S NAME:";
gotoxy(1,5);
cout<<"FATHER NAME:";
gotoxy(45,5);
cout<<"CLASS TEACHER:";
gotoxy(1,9);
cout<<"S.NO.";
gotoxy(15,9);
cout<<"SUBJECT";
gotoxy(30,9);
cout<<"MARKS";
gotoxy(40,9);
cout<<"MAXIMUM MARKS";
gotoxy(70,9);
cout<<"GRADE";
gotoxy(3,11);
cout<<"1";
gotoxy(15,11);
cout<<"ENGLISH";
gotoxy(3,13);
cout<<"2";
gotoxy(15,13);
cout<<"MATHS";
gotoxy(3,15);
cout<<"3";
gotoxy(15,15);
cout<<"PHYSICS";
gotoxy(3,17);
cout<<"4";
gotoxy(15,17);
cout<<"CHEMISTRY";
gotoxy(3,19);
cout<<"5";
gotoxy(15,19);
cout<<"COMPUTER";
gotoxy(3,25);
cout<<"6";
gotoxy(15,25);
cout<<"TOTAL";
gotoxy(3,27);
cout<<"7";
gotoxy(15,27);
cout<<"PERCENTAGE";
gotoxy(8,1);
cin>>m;
gotoxy(25,1);
n=getchar();
fflush(stdin);
fstream result;
result.open("result.dat",ios::app|ios::binary);
gotoxy(40,1);
cin>>l;
kar=checking(m,n,l);
if(kar==1)
result.close();
goto top;
else
{
stdres.clas=m;
stdres.s=n;
stdres.rollno=l;
gotoxy(63,1);
gets(stdres.name);
fflush(stdin);
gotoxy(14,5);
gets(stdres.fatername);
fflush(stdin);
gotoxy(60,5);
gets(stdres.teachname);
cout<<"100";
gotoxy(32,11);
cin>>stdres.engmark;
gotoxy(72,11);
cout<<grade(stdres.engmark,max1);
gotoxy(47,13);
cout<<"100";
gotoxy(32,13);
cin>>stdres.matmark;
gotoxy(72,13);
cout<<grade(stdres.matmark,max1);
gotoxy(47,15);
cout<<" 70";
gotoxy(32,15);
cin>>stdres.phymark;
gotoxy(72,15);
cout<<grade(stdres.phymark,max2);
gotoxy(47,17);
cout<<" 70";
gotoxy(32,17);
cin>>stdres.chemark;
gotoxy(72,17);
cout<<grade(stdres.chemark,max2);
gotoxy(47,19);
cout<<" 70";
gotoxy(32,19);
cin>>stdres.commark;
gotoxy(72,19);
cout<<grade(stdres.commark,max2);
gotoxy(47,25);
cout<<"410";
gotoxy(31,25);
cout<<total(stdres.engmark,stdres.matmark,stdres.phymark,stdres.chemark,stdres.comma
rk);
stdres.total=total(stdres.engmark,stdres.matmark,stdres.phymark,stdres.chemark,stdres.co
mmark);
gotoxy(32,27);
stdres.percentage=percent(stdres.total);
cout<<stdres.percentage;
gotoxy(80,50);
result.write((char*)&stdres,sizeof(stdres));
result.close();
getch();
menu();
if((x*100/y)>74)
return('A');
else
if((x*100/y)>60)
return('B');
else
if((x*100/y)>33)
return('C');
else
return('E');
int t;
t=(a+b+c+d+e);
return (t);
float p=0;
p=(z*100)/410;
return(p);
int suansh=0;
fstream result;
result.open("result.dat",ios::in|ios::binary);
result.read((char*)&stdres,sizeof(stdres));
while(result)
{
if(stdres.clas==z&&stdres.s==y&&stdres.rollno==x)
clrscr();
gotoxy(22,25);
getch();
suansh=1;
break;
result.read((char*)&stdres, sizeof(stdres));
return(suansh);
void menu()
clrscr();
int ans;
textbackground (PINK);
gotoxy(25,10);
cout<<"M A I N M E N U";
gotoxy(17,15);
gotoxy(17,16);
gotoxy(17,17);
cout<<"3. Modify Result";
gotoxy(17,18);
gotoxy(17,19);
gotoxy(17,20);
gotoxy(17,21);
gotoxy(17,22);
cout<<"8. Exit";
gotoxy(40,25);
cout<<"Enter Option(1-8):";
cin>>ans;
switch(ans)
case 1:create();
break;
case 2: add();
break;
case 3: modify();
break;
case 4: search();
break;
case 5: delet();
break;
case 6: merit();
break;
case 7: merit1();
break;
case 8: exit(0);
void search()
textbackground (PINK);
clrscr();
int max1=100,max2=70,roll,flag=0;
char ch;
gotoxy(23,15);
cin>>roll;
fstream result;
result.open("result.dat",ios::in|ios::binary);
result.read((char*)&stdres,sizeof(stdres));
while(result)
if(stdres.rollno==roll)
{
flag=1;
clrscr();
gotoxy(23,25);
cout<<"RECORD FOUND";
gotoxy(23,27);
getch();
clrscr();
cout<<"CLASS:";
gotoxy (16,1);
cout<<"SECTION:";
gotoxy(31,1);
cout<<"ROLL NO:";
gotoxy(47,1);
cout<<"STUDENT'S NAME:";
gotoxy(1,5);
cout<<"FATHER NAME:";
gotoxy(45,5);
cout<<"CLASS TEACHER:";
gotoxy(1,9);
cout<<"S.NO.";
gotoxy(15,9);
cout<<"SUBJECT";
gotoxy(30,9);
cout<<"MARKS";
gotoxy(40,9);
cout<<"MAXIMUM MARKS";
gotoxy(70,9);
cout<<"GRADE";
gotoxy(3,11);
cout<<"1";
gotoxy(15,11);
cout<<"ENGLISH";
gotoxy(3,13);
cout<<"2";
gotoxy(15,13);
cout<<"MATHS";
gotoxy(3,15);
cout<<"3";
gotoxy(15,15);
cout<<"PHYSICS";
gotoxy(3,17);
cout<<"4";
gotoxy(15,17);
cout<<"CHEMISTRY";
gotoxy(3,19);
cout<<"5";
gotoxy(15,19);
cout<<"COMPUTER";
gotoxy(3,25);
cout<<"6";
gotoxy(15,25);
cout<<"TOTAL";
gotoxy(3,27);
cout<<"7";
gotoxy(15,27);
cout<<"PERCENTAGE";
gotoxy(8,1);
gotoxy(25,1);
cout<<stdres.s;
gotoxy(40,1);
cout<<stdres.rollno;
gotoxy(63,1);
puts(stdres.name);
fflush(stdout);
gotoxy(14,5);
puts(stdres.fatername);
fflush(stdout);
gotoxy(60,5);
puts(stdres.teachname);
cout<<"100";
gotoxy(32,11);
cout<<stdres.engmark;
gotoxy(72,11);
cout<<grade(stdres.engmark,max1);
gotoxy(47,13);
cout<<"100";
gotoxy(32,13);
cout<<stdres.matmark;
gotoxy(72,13);
cout<<grade(stdres.matmark,max1);
gotoxy(47,15);
cout<<" 70";
gotoxy(32,15);
cout<<stdres.phymark;
gotoxy(72,15);
cout<<grade(stdres.phymark,max2);
gotoxy(47,17);
cout<<" 70";
gotoxy(32,17);
cout<<stdres.chemark;
gotoxy(72,17);
cout<<grade(stdres.chemark,max2);
gotoxy(47,19);
cout<<" 70";
gotoxy(32,19);
cout<<stdres.commark;
gotoxy(72,19);
cout<<grade(stdres.commark,max2);
gotoxy(47,25);
cout<<"410";
gotoxy(31,25);
cout<<total(stdres.engmark,stdres.matmark,stdres.phymark,stdres.chemark,stdres.comma
rk);
stdres.total=total(stdres.engmark,stdres.matmark,stdres.phymark,stdres.chemark,stdres.co
mmark);
gotoxy(32,27);
stdres.percentage=percent(stdres.total);
cout<<stdres.percentage;
gotoxy(80,50);
result.close();
getch();
menu();
else
result.read((char*)&stdres,sizeof(stdres));
if(flag==0)
clrscr();
gotoxy(23,23);
cout<<"SORRY! The Roll No."<<roll<<" does not exist.";
gotoxy(23,25);
result.close();
getch();
menu();
void modify()
textbackground (PINK);
clrscr();
int max1=100,max2=70,roll,flag=0,flag2=0;
char ch,z,n;
gotoxy(23,15);
cin>>roll;
fstream result,tfile;
result.open("result.dat",ios::in|ios::binary);
tfile.open("tfile.dat",ios::out|ios::binary);
result.read((char*)&stdres,sizeof(stdres));
while(result)
if(stdres.rollno==roll)
{
flag=1;
clrscr();
gotoxy(23,25);
cout<<"RECORD FOUND";
gotoxy(23,27);
getch();
clrscr();
cout<<"CLASS:";
gotoxy (16,1);
cout<<"SECTION:";
gotoxy(31,1);
cout<<"ROLL NO:";
gotoxy(47,1);
cout<<"STUDENT'S NAME:";
gotoxy(1,5);
cout<<"FATHER NAME:";
gotoxy(45,5);
cout<<"CLASS TEACHER:";
gotoxy(1,9);
cout<<"S.NO.";
gotoxy(15,9);
cout<<"SUBJECT";
gotoxy(30,9);
cout<<"MARKS";
gotoxy(40,9);
cout<<"MAXIMUM MARKS";
gotoxy(70,9);
cout<<"GRADE";
gotoxy(3,11);
cout<<"1";
gotoxy(15,11);
cout<<"ENGLISH";
gotoxy(3,13);
cout<<"2";
gotoxy(15,13);
cout<<"MATHS";
gotoxy(3,15);
cout<<"3";
gotoxy(15,15);
cout<<"PHYSICS";
gotoxy(3,17);
cout<<"4";
gotoxy(15,17);
cout<<"CHEMISTRY";
gotoxy(3,19);
cout<<"5";
gotoxy(15,19);
cout<<"COMPUTER";
gotoxy(3,25);
cout<<"6";
gotoxy(15,25);
cout<<"TOTAL";
gotoxy(3,27);
cout<<"7";
gotoxy(15,27);
cout<<"PERCENTAGE";
gotoxy(8,1);
gotoxy(25,1);
cout<<stdres.s;
gotoxy(40,1);
cout<<stdres.rollno;
gotoxy(63,1);
puts(stdres.name);
fflush(stdout);
gotoxy(14,5);
puts(stdres.fatername);
fflush(stdout);
gotoxy(60,5);
puts(stdres.teachname);
cout<<"100";
gotoxy(32,11);
cout<<stdres.engmark;
gotoxy(72,11);
cout<<grade(stdres.engmark,max1);
gotoxy(47,13);
cout<<"100";
gotoxy(32,13);
cout<<stdres.matmark;
gotoxy(72,13);
cout<<grade(stdres.matmark,max1);
gotoxy(47,15);
cout<<" 70";
gotoxy(32,15);
cout<<stdres.phymark;
gotoxy(72,15);
cout<<grade(stdres.phymark,max2);
gotoxy(47,17);
cout<<" 70";
gotoxy(32,17);
cout<<stdres.chemark;
gotoxy(72,17);
cout<<grade(stdres.chemark,max2);
gotoxy(47,19);
cout<<" 70";
gotoxy(32,19);
cout<<stdres.commark;
gotoxy(72,19);
cout<<grade(stdres.commark,max2);
gotoxy(47,25);
cout<<"410";
gotoxy(31,25);
cout<<total(stdres.engmark,stdres.matmark,stdres.phymark,stdres.chemark,stdres.comma
rk);
stdres.total=total(stdres.engmark,stdres.matmark,stdres.phymark,stdres.chemark,stdres.co
mmark);
gotoxy(32,27);
stdres.percentage=percent(stdres.total);
cout<<stdres.percentage;
getch();
gotoxy(32,40);
z=getch();
if(z=='a'||z=='A')
flag2=1;
cout<<"CLASS:";
gotoxy (16,1);
cout<<"SECTION:";
gotoxy(31,1);
cout<<"ROLL NO:";
gotoxy(47,1);
cout<<"STUDENT'S NAME:";
gotoxy(1,5);
cout<<"FATHER NAME:";
gotoxy(45,5);
cout<<"CLASS TEACHER:";
gotoxy(1,9);
cout<<"S.NO.";
gotoxy(15,9);
cout<<"SUBJECT";
gotoxy(30,9);
cout<<"MARKS";
gotoxy(40,9);
cout<<"MAXIMUM MARKS";
gotoxy(70,9);
cout<<"GRADE";
gotoxy(3,11);
cout<<"1";
gotoxy(15,11);
cout<<"ENGLISH";
gotoxy(3,13);
cout<<"2";
gotoxy(15,13);
cout<<"MATHS";
gotoxy(3,15);
cout<<"3";
gotoxy(15,15);
cout<<"PHYSICS";
gotoxy(3,17);
cout<<"4";
gotoxy(15,17);
cout<<"CHEMISTRY";
gotoxy(3,19);
cout<<"5";
gotoxy(15,19);
cout<<"COMPUTER";
gotoxy(3,25);
cout<<"6";
gotoxy(15,25);
cout<<"TOTAL";
gotoxy(3,27);
cout<<"7";
gotoxy(15,27);
cout<<"PERCENTAGE";
gotoxy(8,1);
gotoxy(25,1);
cout<<stdres.s;
gotoxy(40,1);
cout<<stdres.rollno;
gotoxy(63,1);
gotoxy(63,1);
gets(stdres.name);
fflush(stdin);
gotoxy(14,5);
gets(stdres.fatername);
fflush(stdin);
gotoxy(60,5);
gets(stdres.teachname);
cout<<"100";
gotoxy(32,11);
cin>>stdres.engmark;
gotoxy(72,11);
cout<<grade(stdres.engmark,max1);
gotoxy(47,13);
cout<<"100";
gotoxy(32,13);
cin>>stdres.matmark;
gotoxy(72,13);
cout<<grade(stdres.matmark,max1);
gotoxy(47,15);
cout<<" 70";
gotoxy(32,15);
cin>>stdres.phymark;
gotoxy(72,15);
cout<<grade(stdres.phymark,max2);
gotoxy(47,17);
cout<<" 70";
gotoxy(32,17);
cin>>stdres.chemark;
gotoxy(72,17);
cout<<grade(stdres.chemark,max2);
gotoxy(47,19);
cout<<" 70";
gotoxy(32,19);
cin>>stdres.commark;
gotoxy(72,19);
cout<<grade(stdres.commark,max2);
gotoxy(47,25);
cout<<"410";
gotoxy(31,25);
cout<<total(stdres.engmark,stdres.matmark,stdres.phymark,stdres.chemark,stdres.comma
rk);
stdres.total=total(stdres.engmark,stdres.matmark,stdres.phymark,stdres.chemark,stdres.co
mmark);
gotoxy(32,27);
stdres.percentage=percent(stdres.total);
cout<<stdres.percentage;
gotoxy(80,50);
tfile.write((char*)&stdres,sizeof(stdres));
result.read((char*)&stdres,sizeof(stdres));
getch();
else
tfile.write((char*)&stdres,sizeof(stdres));
result.read((char*)&stdres,sizeof(stdres));
else
tfile.write((char*)&stdres,sizeof(stdres));
result.read((char*)&stdres,sizeof(stdres));
result.close();
tfile.close();
if(flag2==1)
result.open("result.dat",ios::out|ios::binary);
tfile.open("tfile.dat",ios::in|ios::binary);
tfile.read((char*)&stdres,sizeof(stdres));
while(tfile)
result.write((char*)&stdres,sizeof(stdres));
tfile.read((char*)&stdres,sizeof(stdres));
result.close();
tfile.close();
if(flag==0)
clrscr();
gotoxy(23,23);
gotoxy(23,25);
result.close();
getch();
}
menu();
void merit1()
clrscr();
int larg,l,flag=0;
gotoxy(15,17);
gotoxy(80,50);
getch();
clrscr();
gotoxy(15,17);
gotoxy(80,50);
delay(2000);
clrscr();
gotoxy(15,15);
cout<<"LIST generated.";
gotoxy(15,17);
getch();
clrscr();
fstream result,tfile;
result.open("result.dat",ios::in|ios::binary);
tfile.open("tfile.dat",ios::out|ios::binary);
result.read((char*)&stdres,sizeof(stdres));
while(result)
l=total(stdres.engmark,stdres.matmark,stdres.phymark,stdres.chemark,stdres.commark);
if(l>368)
temp.roll=stdres.rollno;
strcpy(temp.name,stdres.name);
temp.clas=stdres.clas;
temp.sec=stdres.s;
temp.total=l;
tfile.write((char*)&temp,sizeof(temp));
result.read((char*)&stdres,sizeof(stdres));
}
result.close();
tfile.close();
gotoxy(12,1);
cout<<"ROLL NO.";
gotoxy(22,1);
cout<<"NAME";
gotoxy(38,1);
cout<<"TOTAL";
int k=3;
for(int i=410;i>368;i--)
tfile.open("tfile.dat",ios::in|ios::binary);
tfile.read((char*)&temp,sizeof(temp));
while(tfile)
if(temp.total==i)
flag=1;
gotoxy(15,k);
cout<<temp.roll;
gotoxy(22,k);
cout<<temp.name;
gotoxy(39,k++);
cout<<temp.total;
k++;
}
tfile.read((char*)&temp,sizeof(temp));
tfile.close();
if(flag==0)
clrscr();
gotoxy(15,20);
gotoxy(80,50);
getch();
menu();
void merit()
reverse:
clrscr();
int n,c,k=3,flag=0,i;
gotoxy(15,2);
cout<<"MENU";
gotoxy(15,4);
cout<<"1. ENGLISH";
gotoxy(15,5);
cout<<"2. MATHEMATICS";
gotoxy(15,6);
cout<<"3. PHYSICS";
gotoxy(15,7);
cout<<"4. CHEMISTRY";
gotoxy(15,8);
cout<<"5. COMPUTER";
gotoxy(15,18);
cin>>n;
clrscr();
fstream result;
switch(n)
/*english*/
case 1: back1:
gotoxy(15,2);
gotoxy(15,3);
gotoxy(15,4);
gotoxy(15,7);
cin>>c;
clrscr();
gotoxy(14,1);
cout<<"Roll no.";
gotoxy(25,1);
cout<<"Name";
gotoxy(37,1);
cout<<"Class";
gotoxy(45,1);
cout<<"Section";
gotoxy(60,1);
cout<<"<Marks";
switch(c)
case 1: for(i=100;i>74;i--)
result.open("result.dat",ios::in|ios::binary);
result.read((char*)&stdres,sizeof(stdres));
while(result)
if(stdres.engmark==i)
flag=1;
gotoxy (17,k);
cout<<stdres.rollno;
gotoxy(25,k);
cout<<stdres.name;
gotoxy(39,k);
cout<<stdres.clas;
gotoxy(47,k);
cout<<stdres.s;
gotoxy(62,k++);
cout<<stdres.engmark;
k++;
result.read((char*)&stdres,sizeof(stdres));
result.close();
gotoxy(80,50);
if(flag==0)
gotoxy(20,22);
gotoxy(20,22);
gotoxy(80,50);
}
getch();
break;
case 2: for(i=74;i>60;i--)
result.open("result.dat",ios::in|ios::binary);
result.read((char*)&stdres,sizeof(stdres));
while(result)
if(stdres.engmark==i)
flag=1;
gotoxy (17,k);
cout<<stdres.rollno;
gotoxy(25,k);
cout<<stdres.name;
gotoxy(39,k);
cout<<stdres.clas;
gotoxy(47,k);
cout<<stdres.s;
gotoxy(62,k++);
cout<<stdres.engmark;
k++;
}
result.read((char*)&stdres,sizeof(stdres));
result.close();
gotoxy(80,50);
if(flag==0)
gotoxy(20,22);
gotoxy(80,50);
getch();
break;
case 3: for(i=60;i>33;i--)
result.open("result.dat",ios::in|ios::binary);
result.read((char*)&stdres,sizeof(stdres));
while(result)
if(stdres.engmark==i)
flag=1;
gotoxy (17,k);
cout<<stdres.rollno;
gotoxy(25,k);
cout<<stdres.name;
gotoxy(39,k);
cout<<stdres.clas;
gotoxy(47,k);
cout<<stdres.s;
gotoxy(62,k++);
cout<<stdres.engmark;
k++;
result.read((char*)&stdres,sizeof(stdres));
result.close();
gotoxy(80,50);
if(flag==0)
gotoxy(20,22);
gotoxy(80,50);
getch();
break;
{
result.open("result.dat",ios::in|ios::binary);
result.read((char*)&stdres,sizeof(stdres));
while(result)
if(stdres.engmark==i)
flag=1;
gotoxy (17,k);
cout<<stdres.rollno;
gotoxy(25,k);
cout<<stdres.name;
gotoxy(39,k);
cout<<stdres.clas;
gotoxy(47,k);
cout<<stdres.s;
gotoxy(62,k++);
cout<<stdres.engmark;
k++;
result.read((char*)&stdres,sizeof(stdres));
result.close();
gotoxy(80,50);
if(flag==0)
{
gotoxy(20,22);
gotoxy(80,50);
getch();
break;
default:clrscr();
gotoxy(25,25);
cout<<"Invalid Option.";
getch();
goto back1;
menu();
/*mathematics*/
case 2: back2:
gotoxy(15,2);
gotoxy(15,3);
gotoxy(15,4);
gotoxy(15,5);
gotoxy(15,7);
cout<<"Enter your Option: ";
cin>>c;
clrscr();
gotoxy(14,1);
cout<<"Roll no.";
gotoxy(25,1);
cout<<"Name";
gotoxy(37,1);
cout<<"Class";
gotoxy(45,1);
cout<<"Section";
gotoxy(60,1);
cout<<"Marks";
switch(c)
case 1: for(i=100;i>74;i--)
result.open("result.dat",ios::in|ios::binary);
result.read((char*)&stdres,sizeof(stdres));
while(result)
if(stdres.matmark==i)
flag=1;
gotoxy (17,k);
cout<<stdres.rollno;
gotoxy(25,k);
cout<<stdres.name;
gotoxy(39,k);
cout<<stdres.clas;
gotoxy(47,k);
cout<<stdres.s;
gotoxy(62,k++);
cout<<stdres.matmark;
k++;
result.read((char*)&stdres,sizeof(stdres));
result.close();
gotoxy(80,50);
if(flag==0)
gotoxy(20,22);
gotoxy(20,22);
gotoxy(80,50);
getch();
break;
case 2: for(i=74;i>60;i--)
result.open("result.dat",ios::in|ios::binary);
result.read((char*)&stdres,sizeof(stdres));
while(result)
if(stdres.matmark==i)
flag=1;
gotoxy (17,k);
cout<<stdres.rollno;
gotoxy(25,k);
cout<<stdres.name;
gotoxy(39,k);
cout<<stdres.clas;
gotoxy(47,k);
cout<<stdres.s;
gotoxy(62,k++);
cout<<stdres.matmark;
k++;
result.read((char*)&stdres,sizeof(stdres));
}
result.close();
gotoxy(80,50);
if(flag==0)
gotoxy(20,22);
gotoxy(80,50);
getch();
break;
case 3: for(i=60;i>33;i--)
result.open("result.dat",ios::in|ios::binary);
result.read((char*)&stdres,sizeof(stdres));
while(result)
if(stdres.matmark==i)
flag=1;
gotoxy (17,k);
cout<<stdres.rollno;
gotoxy(25,k);
cout<<stdres.name;
gotoxy(39,k);
cout<<stdres.clas;
gotoxy(47,k);
cout<<stdres.s;
gotoxy(62,k++);
cout<<stdres.matmark;
k++;
result.read((char*)&stdres,sizeof(stdres));
result.close();
gotoxy(80,50);
if(flag==0)
gotoxy(20,22);
gotoxy(80,50);
getch();
break;
result.open("result.dat",ios::in|ios::binary);
result.read((char*)&stdres,sizeof(stdres));
while(result)
if(stdres.matmark==i)
flag=1;
gotoxy (17,k);
cout<<stdres.rollno;
gotoxy(25,k);
cout<<stdres.name;
gotoxy(39,k);
cout<<stdres.clas;
gotoxy(47,k);
cout<<stdres.s;
gotoxy(62,k++);
cout<<stdres.matmark;
k++;
result.read((char*)&stdres,sizeof(stdres));
result.close();
gotoxy(80,50);
if(flag==0)
gotoxy(20,22);
getch();
break;
default:clrscr();
gotoxy(25,25);
cout<<"Invalid Option.";
getch();
goto back2;
menu();
/*physics*/
case 3: back3:
gotoxy(15,2);
gotoxy(15,3);
gotoxy(15,4);
gotoxy(15,5);
gotoxy(15,7);
cin>>c;
clrscr();
gotoxy(14,1);
cout<<"Roll no.";
gotoxy(25,1);
cout<<"Name";
gotoxy(37,1);
cout<<"Class";
gotoxy(45,1);
cout<<"Section";
gotoxy(60,1);
cout<<"Marks";
switch(c)
case 1: for(i=100;i>74;i--)
result.open("result.dat",ios::in|ios::binary);
result.read((char*)&stdres,sizeof(stdres));
while(result)
if(stdres.phymark==i)
flag=1;
gotoxy (17,k);
cout<<stdres.rollno;
gotoxy(25,k);
cout<<stdres.name;
gotoxy(39,k);
cout<<stdres.clas;
gotoxy(47,k);
cout<<stdres.s;
gotoxy(62,k++);
cout<<stdres.phymark;
k++;
result.read((char*)&stdres,sizeof(stdres));
result.close();
gotoxy(80,50);
if(flag==0)
gotoxy(20,22);
gotoxy(20,22);
gotoxy(80,50);
getch();
break;
case 2: for(i=74;i>60;i--)
{
result.open("result.dat",ios::in|ios::binary);
result.read((char*)&stdres,sizeof(stdres));
while(result)
if(stdres.phymark==i)
flag=1;
gotoxy (17,k);
cout<<stdres.rollno;
gotoxy(25,k);
cout<<stdres.name;
gotoxy(39,k);
cout<<stdres.clas;
gotoxy(47,k);
cout<<stdres.s;
gotoxy(62,k++);
cout<<stdres.phymark;
k++;
result.read((char*)&stdres,sizeof(stdres));
result.close();
gotoxy(80,50);
if(flag==0)
gotoxy(20,22);
gotoxy(80,50);
getch();
break;
case 3: for(i=60;i>33;i--)
result.open("result.dat",ios::in|ios::binary);
result.read((char*)&stdres,sizeof(stdres));
while(result)
if(stdres.phymark==i)
flag=1;
gotoxy (17,k);
cout<<stdres.rollno;
gotoxy(25,k);
cout<<stdres.name;
gotoxy(39,k);
cout<<stdres.clas;
gotoxy(47,k);
cout<<stdres.s;
gotoxy(62,k++);
cout<<stdres.phymark;
k++;
result.read((char*)&stdres,sizeof(stdres));
result.close();
gotoxy(80,50);
if(flag==0)
gotoxy(20,22);
gotoxy(80,50);
getch();
break;
result.open("result.dat",ios::in|ios::binary);
result.read((char*)&stdres,sizeof(stdres));
while(result)
if(stdres.phymark==i)
{
flag=1;
gotoxy (17,k);
cout<<stdres.rollno;
gotoxy(25,k);
cout<<stdres.name;
gotoxy(39,k);
cout<<stdres.clas;
gotoxy(47,k);
cout<<stdres.s;
gotoxy(62,k++);
cout<<stdres.phymark;
k++;
result.read((char*)&stdres,sizeof(stdres));
result.close();
gotoxy(80,50);
if(flag==0)
gotoxy(20,22);
gotoxy(80,50);
getch();
break;
default:clrscr();
gotoxy(25,25);
cout<<"Invalid Option.";
getch();
goto back3;
menu();
/*chemistry*/
case 4: back4:
gotoxy(15,2);
gotoxy(15,3);
gotoxy(15,4);
gotoxy(15,5);
gotoxy(15,7);
cin>>c;
clrscr();
gotoxy(14,1);
cout<<"Roll no.";
gotoxy(25,1);
cout<<"Name";
gotoxy(37,1);
cout<<"Class";
gotoxy(45,1);
cout<<"Section";
gotoxy(60,1);
cout<<"Marks";
switch(c)
case 1: for(i=100;i>74;i--)
result.open("result.dat",ios::in|ios::binary);
result.read((char*)&stdres,sizeof(stdres));
while(result)
if(stdres.chemark==i)
flag=1;
gotoxy (17,k);
cout<<stdres.rollno;
gotoxy(25,k);
cout<<stdres.name;
gotoxy(39,k);
cout<<stdres.clas;
gotoxy(47,k);
cout<<stdres.s;
gotoxy(62,k++);
cout<<stdres.chemark;
k++;
result.read((char*)&stdres,sizeof(stdres));
result.close();
gotoxy(80,50);
if(flag==0)
gotoxy(20,22);
gotoxy(20,22);
gotoxy(80,50);
getch();
break;
case 2: for(i=74;i>60;i--)
result.open("result.dat",ios::in|ios::binary);
result.read((char*)&stdres,sizeof(stdres));
while(result)
if(stdres.chemark==i)
flag=1;
gotoxy (17,k);
cout<<stdres.rollno;
gotoxy(25,k);
cout<<stdres.name;
gotoxy(39,k);
cout<<stdres.clas;
gotoxy(47,k);
cout<<stdres.s;
gotoxy(62,k++);
cout<<stdres.chemark;
k++;
result.read((char*)&stdres,sizeof(stdres));
result.close();
gotoxy(80,50);
if(flag==0)
{
gotoxy(20,22);
gotoxy(80,50);
getch();
break;
case 3: for(i=60;i>33;i--)
result.open("result.dat",ios::in|ios::binary);
result.read((char*)&stdres,sizeof(stdres));
while(result)
if(stdres.chemark==i)
flag=1;
gotoxy (17,k);
cout<<stdres.rollno;
gotoxy(25,k);
cout<<stdres.name;
gotoxy(39,k);
cout<<stdres.clas;
gotoxy(47,k);
cout<<stdres.s;
gotoxy(62,k++);
cout<<stdres.chemark;
k++;
result.read((char*)&stdres,sizeof(stdres));
result.close();
gotoxy(80,50);
if(flag==0)
gotoxy(20,22);
gotoxy(80,50);
getch();
break;
result.open("result.dat",ios::in|ios::binary);
result.read((char*)&stdres,sizeof(stdres));
while(result)
if(stdres.chemark==i)
flag=1;
gotoxy (17,k);
cout<<stdres.rollno;
gotoxy(25,k);
cout<<stdres.name;
gotoxy(39,k);
cout<<stdres.clas;
gotoxy(47,k);
cout<<stdres.s;
gotoxy(62,k++);
cout<<stdres.chemark;
k++;
result.read((char*)&stdres,sizeof(stdres));
result.close();
gotoxy(80,50);
if(flag==0)
gotoxy(20,22);
gotoxy(80,50);
getch();
break;
default:clrscr();
gotoxy(25,25);
cout<<"Invalid Option.";
getch();
goto back4;
menu();
/*computer*/
case 5: back5:
gotoxy(15,2);
gotoxy(15,3);
gotoxy(15,4);
gotoxy(15,5);
gotoxy(15,7);
cin>>c;
clrscr();
gotoxy(14,1);
cout<<"Roll no.";
gotoxy(25,1);
cout<<"Name";
gotoxy(37,1);
cout<<"Class";
gotoxy(45,1);
cout<<"Section";
gotoxy(60,1);
cout<<"Marks";
switch(c)
case 1: for(i=100;i>74;i--)
result.open("result.dat",ios::in|ios::binary);
result.read((char*)&stdres,sizeof(stdres));
while(result)
if(stdres.commark==i)
flag=1;
gotoxy (17,k);
cout<<stdres.rollno;
gotoxy(25,k);
cout<<stdres.name;
gotoxy(39,k);
cout<<stdres.clas;
gotoxy(47,k);
cout<<stdres.s;
gotoxy(62,k++);
cout<<stdres.commark;
k++;
}
result.read((char*)&stdres,sizeof(stdres));
result.close();
gotoxy(80,50);
if(flag==0)
gotoxy(20,22);
gotoxy(20,22);
gotoxy(80,50);
getch();
break;
case 2: for(i=74;i>60;i--)
result.open("result.dat",ios::in|ios::binary);
result.read((char*)&stdres,sizeof(stdres));
while(result)
{
if(stdres.commark==i)
flag=1;
gotoxy (17,k);
cout<<stdres.rollno;
gotoxy(25,k);
cout<<stdres.name;
gotoxy(39,k);
cout<<stdres.clas;
gotoxy(47,k);
cout<<stdres.s;
gotoxy(62,k++);
cout<<stdres.commark;
k++;
result.read((char*)&stdres,sizeof(stdres));
result.close();
gotoxy(80,50);
if(flag==0)
gotoxy(20,22);
getch();
break;
case 3: for(i=60;i>33;i--)
result.open("result.dat",ios::in|ios::binary);
result.read((char*)&stdres,sizeof(stdres));
while(result)
if(stdres.commark==i)
flag=1;
gotoxy (17,k);
cout<<stdres.rollno;
gotoxy(25,k);
cout<<stdres.name;
gotoxy(39,k);
cout<<stdres.clas;
gotoxy(47,k);
cout<<stdres.s;
gotoxy(62,k++);
cout<<stdres.commark;
k++;
}
result.read((char*)&stdres,sizeof(stdres));
result.close();
gotoxy(80,50);
if(flag==0)
gotoxy(20,22);
gotoxy(80,50);
getch();
break;
result.open("result.dat",ios::in|ios::binary);
result.read((char*)&stdres,sizeof(stdres));
while(result)
if(stdres.commark==i)
flag=1;
gotoxy (17,k);
cout<<stdres.rollno;
gotoxy(25,k);
cout<<stdres.name;
gotoxy(39,k);
cout<<stdres.clas;
gotoxy(47,k);
cout<<stdres.s;
gotoxy(62,k++);
cout<<stdres.commark;
k++;
result.read((char*)&stdres,sizeof(stdres));
result.close();
gotoxy(80,50);
if(flag==0)
gotoxy(20,22);
gotoxy(80,50);
getch();
break;
default:clrscr();
gotoxy(25,25);
cout<<"Invalid Option.";
getch();
goto back5;
menu();
default: clrscr();
cout<<"INVALID OPTION";
getch();
menu();
gotoxy(80,50);
void delet()
clrscr();
student stud;
int r,s,flag=0;
char t,z;
cin>>s;
cin>>t;
cin>>r;
fstream result,tfile;
result.open("result.dat",ios::in|ios::binary);
tfile.open("tfile.dat",ios::out|ios::binary);
result.read((char*)&stdres,sizeof(stdres));
while(result)
if(stdres.clas==s&&stdres.s==t&&stdres.rollno==r)
clrscr();
flag=1;
gotoxy(20,20);
getch();
else
tfile.write((char*)&stdres,sizeof(stdres));
result.read((char*)&stdres,sizeof(stdres));
result.close();
tfile.close();
if(flag==0)
clrscr();
gotoxy(25,22);
getch();
exit(0);
result.open("result.dat",ios::out|ios::binary);
tfile.open("tfile.dat",ios::in|ios::binary);
tfile.read((char*)&stdres,sizeof(stdres));
while(tfile)
result.write((char*)&stdres,sizeof(stdres));
tfile.read((char*)&stdres,sizeof(stdres));
result.close();
tfile.close();
clrscr();
getch();
result.open("result.dat",ios::in|ios::binary);
result.read((char*)&stdres,sizeof(stdres));
while(result)
clrscr();
int max1=100,max2=70;
char ch;
cout<<"CLASS:";
gotoxy (16,1);
cout<<"SECTION:";
gotoxy(31,1);
cout<<"ROLL NO:";
gotoxy(47,1);
cout<<"STUDENT'S NAME:";
gotoxy(1,5);
cout<<"FATHER NAME:";
gotoxy(45,5);
cout<<"CLASS TEACHER:";
gotoxy(1,9);
cout<<"S.NO.";
gotoxy(15,9);
cout<<"SUBJECT";
gotoxy(30,9);
cout<<"MARKS";
gotoxy(40,9);
cout<<"MAXIMUM MARKS";
gotoxy(70,9);
cout<<"GRADE";
gotoxy(3,11);
cout<<"1";
gotoxy(15,11);
cout<<"ENGLISH";
gotoxy(3,13);
cout<<"2";
gotoxy(15,13);
cout<<"MATHS";
gotoxy(3,15);
cout<<"3";
gotoxy(15,15);
cout<<"PHYSICS";
gotoxy(3,17);
cout<<"4";
gotoxy(15,17);
cout<<"CHEMISTRY";
gotoxy(3,19);
cout<<"5";
gotoxy(15,19);
cout<<"COMPUTER";
gotoxy(3,25);
cout<<"6";
gotoxy(15,25);
cout<<"TOTAL";
gotoxy(3,27);
cout<<"7";
gotoxy(15,27);
cout<<"PERCENTAGE";
gotoxy(8,1);
gotoxy(25,1);
cout<<stdres.s;
gotoxy(40,1);
cout<<stdres.rollno;
gotoxy(63,1);
puts(stdres.name);
fflush(stdout);
gotoxy(14,5);
puts(stdres.fatername);
fflush(stdout);
gotoxy(60,5);
puts(stdres.teachname);
cout<<"100";
gotoxy(32,11);
cout<<stdres.engmark;
gotoxy(72,11);
cout<<stud.grade(stdres.engmark,max1);
gotoxy(47,13);
cout<<"100";
gotoxy(32,13);
cout<<stdres.matmark;
gotoxy(72,13);
cout<<stud.grade(stdres.matmark,max1);
gotoxy(47,15);
cout<<" 70";
gotoxy(32,15);
cout<<stdres.phymark;
gotoxy(72,15);
cout<<stud.grade(stdres.phymark,max2);
gotoxy(47,17);
cout<<" 70";
gotoxy(32,17);
cout<<stdres.chemark;
gotoxy(72,17);
cout<<stud.grade(stdres.chemark,max2);
gotoxy(47,19);
cout<<" 70";
gotoxy(32,19);
cout<<stdres.commark;
gotoxy(72,19);
cout<<stud.grade(stdres.commark,max2);
gotoxy(47,25);
cout<<"410";
gotoxy(31,25);
gotoxy(32,27);
stdres.percentage=stud.percent(stdres.total);
cout<<stdres.percentage;
gotoxy(80,50);
result.read((char*)&stdres,sizeof(stdres));
getch();
result.close();
menu();
. CONCLUSION
“Computerization Student Management System” has been developed to
make the management more efficient. It is an interactive package to
assist the management in taking the various decisions and to make
management work more easy. This software can further be modified on
several fields to be more information and more users friendly. At present
it is working with expected results. This system has been developed with
a view to reduce the clerical work and to provide much better services to
the users. Although this software is satisfactory at our programming
level, yet it has a large scope of improvement.