Anda di halaman 1dari 37

1

Computer Science
Project Report

CERTIFICATE

This is to certify that the project report entitled…

“Program on SCHOOL STUDENT’S DATABASE.”


Done by…KUSH BHAGAT…of class XII-C is an enthusiastic work
carried out by him at VISWA BHARATI PUBLIC SCHOOL under
my guidance.

Mrs. ARCHANA GOEL


2
Computer Science
Project Report

ACKNOWLEDGEMENT

Our foremost and profound gratitude goes to Mrs. ARCHANA


GOEL, for her proficient and enthusiastic guidance and
encouragement. The suggestions given undoubtly helped in
supplementing my thoughts in the right direction for attaining the
desired objective.
I thanks my friends & my family members who have contributed
directly or indirectly towards the successful completion of this
report.

KUSH BHAGAT
3
Computer Science
Project Report

CONTENTS

Page No.

• INTRODUCTION 4
• DISCUSSION 5
• SOURCE CODE 8
• OUTPUT SCREENS 32
• BIBLOGRAPHY 39
4
Computer Science
Project Report

INTRODUCTION

I n our daily life we come across with the


use of various databases and its concepts.
This project helps in assisting the school
database with the following fields:

• Name
• Course
• Stream
• Roll number
• Father’s name
• Mother’s name
• Address
• Bus number
• Enrolment number (Auto Generated)

The program consists of an internal search. All these


fields can be edited & deleted.
5
Computer Science
Project Report

DISSCUSION

T his Program is about SchoolDatabase Management.

• Every time you open, exit or use any option in the


program, a backup of the database is created with

the updated data.

• My best efforts have been put forward to keep my


program completely free from any type of errors.

• To create a new admission, simply select the ADD


option from the menu. Enter the required
information of the student and get going. Text
editor automatically saves each character you type
in, so you are saved of the trouble of specifically
saving your text.

• Enrolment number is automatically assigned by the


program to the student when his data is entered
the first time.
6
Computer Science
Project Report

• You can search the student’s data by the SEARCH


option either by his/her name or enrolment
number. General information will be displayed.
Personal information is password secured.

• Data once entered can be edited by the EDIT


option.

• You can delete the information with the DELETE


option.
7
Computer Science
Project Report

S CHOOL S TUDENT’S

D ATABASE
8
Computer Science
Project Report

SOURCE CODE

# include <string.h>
# include <conio.h>
# include <stdlib.h>
# include <stdio.h>
# include <dos.h>
# include <time.h>
# include <math.h>
# include <fstream.h>
# include <ctype.h>

int ctr_pas=0 , desk=0 , enrol;

void check();
void backup();
void del_db();

void pass();
void enter_data();
void view_personal();
void match_name();
void match_enrol();
void edit_data();
void del();

void help();

void time_norm();
void time_main();

void desktop();
void main();

struct student_inf
{
char stu_name[30],
clas[5] ,
course[5],stream[5],
9
Computer Science
Project Report

batch[5],
fat_name[30] , mot_name[30],
roll_no[8],
add[50] , pho_no[20];

int enrol_no;
} struc_info;

class student_info
{
public:

void getdata()
{
textcolor(15);
cprintf("Student's Name: "); gets (struc_info.stu_name);
cprintf("Class: "); gets (struc_info.clas);
cprintf("Course: "); gets (struc_info.course);
cprintf("Stream: "); gets (struc_info.stream);
cprintf("Father's Name: "); gets (struc_info.fat_name);
cprintf("Mother's Name: "); gets (struc_info.mot_name);
cprintf("Roll No.: "); gets (struc_info.roll_no);
cprintf("Address: "); gets (struc_info.add);
cprintf("Ph.No.: "); gets (struc_info.pho_no);
struc_info.enrol_no=::enrol;
}

void display()
{
textcolor(15);
cprintf("Student's Name: "); puts (struc_info.stu_name);
cprintf("Class: "); puts (struc_info.clas);
cprintf("Course: "); puts (struc_info.course);
cprintf("Stream.: "); puts (struc_info.stream);
cprintf("Enrol.No.: "); cout<<(struc_info.enrol_no);
cprintf("Father's Name: "); puts (struc_info.fat_name);
cprintf("Mother's Name: "); puts (struc_info.mot_name);
cprintf("Roll No.: "); puts (struc_info.roll_no);
cprintf("Address: "); puts (struc_info.add);
cprintf("Ph.No.: "); puts (struc_info.pho_no);
}

void displayg()
{
textcolor(15);
cprintf("Student's Name: "); puts (struc_info.stu_name);
10
Computer Science
Project Report

cprintf(" Class: "); puts (struc_info.clas);


cprintf(" Course: "); puts (struc_info.course);
cprintf(" Roll No.: "); puts (struc_info.roll_no);
}

void edit_data()
{
textcolor(15);
cprintf("Student's Name: "); puts (struc_info.stu_name);
cprintf("Class: "); gets (struc_info.clas);
cprintf("Course: "); gets (struc_info.course);

cprintf("Stream.: "); gets (struc_info.stream);

cprintf("Father's Name: "); puts (struc_info.fat_name);


cprintf("Mother's Name: "); puts (struc_info.mot_name);
cprintf("Roll No.: "); gets (struc_info.roll_no);

cprintf("Address: "); puts (struc_info.add);


cout<<"Press enter to retain address otherwise space.";int
ch=getch();cout<<endl;
if (ch==32)
{ cprintf("Address: "); gets (struc_info.add); }

cprintf("Ph.No.: "); puts (struc_info.pho_no);


cout<<"Press enter to retain phone no. otherwise
space.";ch=getch();cout<<endl;
if (ch==32)
{ cprintf("Ph.No.: "); gets (struc_info.pho_no); }

struc_info.enrol_no=::enrol;
}
} io_data;

class student_ginfo
{
int enrol_no;
char choice;
public:
void getdata()
{
textcolor(15);
char nam_enrol;
gotoxy(4,22);
cprintf("Search according to (n)ame or Enr(o)llment No.: ");
nam_enrol=getche();nam_enrol=tolower(nam_enrol);
11
Computer Science
Project Report

if(nam_enrol=='n')
{
cout<<"."; delay(400); cout<<"."; delay(400); cout<<"."; delay(400);
match_name();
}
else if(nam_enrol=='o')
{
cout<<"."; delay(400); cout<<"."; delay(400); cout<<"."; delay(400);
match_enrol();
}
else
{
gotoxy(64,25);
cout<<"INVALID INPUT"<<"."; delay(400); cout<<"."; delay(400);
cout<<".";
delay(400);
main();
}
cout<<"Press 'y' to view the students personal information: "<<endl
<<"WARNING: THIS INFO IS OLNY FOR THE STAFF: ";

choice=getche();
if((choice=='y')||(choice=='Y'))
{
cout<<"."; delay(400); cout<<"."; delay(400); cout<<"."; delay(400);
cout<<endl;
pass();
if(::ctr_pas>0)
{ view_personal(); }
}
else
{
gotoxy(44,12);
cout<<"."; delay(400); cout<<"."; delay(400); cout<<"."; delay(400);
main();
}
}
} view_info;

void check()
{
ifstream check;
check.open("database.vbps",ios::beg|ios::binary);
if(check==NULL)
{
clrscr();
12
Computer Science
Project Report

time_norm();
textcolor(15);
gotoxy(1,4);
cprintf("Database does not exist. Press any key to go back to main.");getch();
check.close();
main();
}
check.close();
}

void backup()
{
fstream file("database.vbps",ios::in|ios::binary);
if(file!=NULL)
{
fstream file2("newbackup.vbps",ios::out|ios::binary);
while(file.read((char*)& struc_info,sizeof(student_inf)))
{ file2.write((char*)& struc_info,sizeof(student_inf)); }
file.close();
file2.close();
remove("backup.vbps");
rename("newbackup.vbps","backup.vbps");
}

fstream file3 , file4;


file3.open("database.vbps",ios::in|ios::binary|ios::beg);
file3.seekg(0,ios::end);
file4.open("database.vbps",ios::in|ios::binary|ios::beg);
file4.seekg(0,ios::end);
int t=file3.tellg();
int s=file4.tellg();
if ((t==0)||(s==9))
{
remove("backup.vbps");
remove("database.vbps");
}
file3.close();
}
void del_db()
{
char ch;
cout<<"PRESS ENTER TO DELETE COMPLETE DATABASE.\n";
ch=getch();
if(int(ch)==13)
{
13
Computer Science
Project Report

remove("database.vbps");
cout<<"DO YOU WANT TO DELETE BACK UP FILE ALSO. PRESS
ENTER TO DO SO.\n";
ch=getch();
if(int(ch)==13)
{
remove("backup.vbps");
}
}
else
{
cout<<"INVALID INPUT! PLEASE TRY AGAIN!"<<endl;
}
}

void pass()
{
textcolor(15);
::ctr_pas=0;
int c_pas=0;
char stringo[4] , stringg[4];
stringo[0]='V'; stringo[1]='B'; stringo[2]='P'; stringo[3]='S';
for (int i=1;i<=3;i++)
{
c_pas=0;
cout<<"Enter Pin: ";
for(int y=0;y<=3;y++)
{ stringg[y]=getch(); cout<<"*"; }
cout<<endl;
for(int s=0;s<=3;s++)
{
if(stringg[s]==stringo[s])
{ c_pas++; }
}
if (c_pas==4)
{ ::ctr_pas++; break; }
else
{ cout<<"INVALID PIN! Make sure caps lock is ON.\n "<<endl; }
}
if (::ctr_pas<1)
{ delay(1000); main(); }
clrscr();
time_norm();
gotoxy(1,5);
}
14
Computer Science
Project Report

void enter_data()
{
::ctr_pas=0;
textcolor(15);
char ans;
int a=0;
fstream count;
count.open("database.vbps",ios::in|ios::binary|ios::beg);
while(count.read((char*)& struc_info,sizeof(student_inf)))
{ a=(struc_info.enrol_no); }
count.close();

gotoxy(1,5);
cout<<"Enter Data(y/n): "; ans=getche();
cout<<endl<<endl;
if((ans=='y')||(ans=='Y'))
{
fstream file;
file.open("database.vbps",ios::binary|ios::app);
file.seekg(0,ios::end);
if (a==0)
{
cout<<"FIRST RECORD!\n"; ::enrol=1;
cout<<"ENROLLMENT GRANTED! YOUR ENROLLMENT NO. IS:
"<<::enrol<<"\n";
io_data.getdata();
file.write((char*)& struc_info,sizeof(student_inf));
file.close();
}
else
{
::enrol=a+1;
cout<<"ENROLLMENT GRANTED! YOUR ENROLLMENT NO. IS:
"<<::enrol<<"\n";
io_data.getdata();
file.write((char*)& struc_info,sizeof(student_inf));
file.close();
}
}
else
{
cout<<"LOADING"<<"."; delay(400); cout<<"."; delay(400); cout<<".";
delay(400);
15
Computer Science
Project Report

main();
}
}

void view_personal()
{
textcolor(15);
::ctr_pas=0;
ifstream file;
file.open("database.vbps",ios::beg||ios::binary);
file.read((char*)& struc_info,sizeof(student_inf));
int enrol;
cout<<"Enter Enrollment No.: "; cin>>enrol;
cout<<endl;
int ptr , ctr_match=0;
while(!file.eof())
{
ptr=(struc_info.enrol_no/enrol);
if (ptr==1)
{
ctr_match++;
io_data.display();
cout<<endl;
break;
}
file.read((char*)& struc_info,sizeof(student_inf));
}
file.close();
if (ctr_match==0)
{
cout<<"No match"
<<"."; delay(400); cout<<"."; delay(400); cout<<"."; delay(400); main();
}
else
{
cout<<"Press any key to go back to main menu. ";int ch;
do{ ch=getch(); } while(ch!=13);
main();
}
}

void match_name()
{
clrscr();
textcolor(15);
16
Computer Science
Project Report

time_norm();
ifstream file;
file.open("database.vbps",ios::beg||ios::binary);
file.read((char*)& struc_info,sizeof(student_inf));
char name[30];
gotoxy(1,4); cout<<"Enter Name: "; cin>>name;
int ptr , ctr=0;

while(!file.eof())
{
ptr=strcmpi(name,struc_info.stu_name);
if (ptr==0)
{
ctr++;
cout<<ctr<<". ";
io_data.displayg();
cout<<endl;
getch();
}
file.read((char*)& struc_info,sizeof(student_inf));
}
if (ctr==0)
{
cout<<"No Match"
<<"."; delay(400); cout<<"."; delay(400); cout<<"."; delay(400); main();
}
file.close();
}

void match_enrol()
{
textcolor(15);
clrscr();
time_norm();
ifstream file;
file.open("database.vbps",ios::beg||ios::binary);
file.read((char*)& struc_info,sizeof(student_inf));
int enrol , ctr=0;
gotoxy(1,4); cout<<"Enter Enrollment No.: "; cin>>enrol;
file.seekg(0,ios::beg);

while(!file.eof())
{
if (struc_info.enrol_no==enrol)
{
ctr++;
17
Computer Science
Project Report

cout<<ctr<<". ";
io_data.displayg();
cout<<endl;
break;
}
file.read((char*)& struc_info,sizeof(student_inf));
}
if (ctr==0)
{
cout<<"No Match"<<"."; delay(400); cout<<"."; delay(400); cout<<".";
delay(400);
main();
}
file.close();
}

void edit_data()
{
textcolor(15);
fstream file;
file.open("database.vbps",ios::in|ios::out|ios::beg|ios::binary|ios::ate);
file.seekg(0,ios::beg);
file.read((char*)& struc_info,sizeof(student_inf));
int enrol , ctr=0 , x;
cout<<"Enrollment No.:: ";cin>>enrol;cout<<endl;
while(!file.eof())
{
if (struc_info.enrol_no==enrol)
{ ctr++; x=file.tellg()-sizeof(student_inf); break; }
file.read((char*)& struc_info,sizeof(student_inf));
}
if (ctr==0)
{
cout<<"No Match"<<"."; delay(400); cout<<"."; delay(400); cout<<".";
delay(400);
main();
}
puts("Current details are: ");cout<<endl;
io_data.display();cout<<endl;
puts("Do you want to continue(y/n): ");cout<<endl;
char choice=getch(); choice=tolower(choice);
if(choice=='y')
{
::enrol=enrol;
io_data.edit_data();
file.seekg(x,ios::beg);
18
Computer Science
Project Report

file.write((char*)& struc_info,sizeof(student_inf));
file.close();
}
else
{ file.close(); }
}

void del()
{
textcolor(15);
clrscr();
time_norm();
int enrol;
gotoxy(1,5);
cout<<"Enter Enrollment No.:";cin>>enrol;
int check=0;
fstream file("database.vbps",ios::in|ios::binary);
if(file==NULL)
{
cout<<"File does not exist. Press any key to go back to main.";getch();
main();
}

fstream file2("temp.vbps",ios::out|ios::binary);
char ch;
cout<<"Are you sure you want to delete Enrollment No. "<<enrol<<" (y/n): ";
ch=getche();ch=tolower(ch);cout<<endl;
if(ch=='y')
{
while(file.read((char*)& struc_info,sizeof(student_inf)))
{
if (enrol!=struc_info.enrol_no)
{ file2.write((char*)& struc_info,sizeof(student_inf)); }
else
{
io_data.display();
char che;
do
{
cout<<endl;
cout<<"Are you sure you want to delete Enrollment No. "<<enrol<<"
(y/n): ";
che=getche();che=tolower(che);cout<<endl;
if (che=='y')
{ check=1; break; }
else
19
Computer Science
Project Report

{
file2.write((char*)& struc_info,sizeof(student_inf));
file.close();
file2.close();
main();
break;
}
}while(che!='y');
}
}
if (check==0)
{
cout<<"Enrollment No. does not exist. Press any key to go back to main.";
getch();
main();
}
else
{
cout<<endl<<"\nDeleted. Press any key to go back to main.";getch();
file.close();
file2.close();
remove("database.vbps");
rename("temp.vbps","database.vbps");
main();
}
getch();
}
else
{
file.close();
file2.close();
main();
}
}

void help()
{
for (int s=1;s<=3;s++)
{
start:
_setcursortype(_NOCURSOR);
textcolor(15);
clrscr();
gotoxy(19,1); textcolor(5); cprintf("|");

for (int x=1;x<46;x++)


20
Computer Science
Project Report

{ textcolor(4); cprintf("-"); }

textcolor(5); cprintf("|");
gotoxy(33,2); textcolor(14); cprintf("STUDENT DATABASE\n");
gotoxy(28,3); cprintf("VISHWA BHARTI PUBLIC
SCHOOL\n");
gotoxy(32,4); cprintf("SECTOR-28 NOIDA\n");
gotoxy(33,5); cprintf("UTTAR PRADESH\n");
gotoxy(19,6); textcolor(5); cprintf("|");

for (x=1;x<46;x++)
{ textcolor(4); cprintf("-"); }

gotoxy(65,6); textcolor(5); cprintf("|");


gotoxy(46,8); cout<<"|";
gotoxy(46,8); cout<<"|";
time_main();
if(s==1)
{
gotoxy(60,23);
cout<<"PAGE "<<s<<" OF 3";
gotoxy(3,12); cout<<"¯ This Program is about Collage Student Database
(DB) Management.";
gotoxy(3,13); cout<<"¯ To create a new DB, simply select the ADD option
from the menu.";
gotoxy(3,14); cout<<"¯ Enter the required information of the student and
get going.";
gotoxy(3,15); cout<<"¯ Text editor automatically saves each character you
type in, so you are";
gotoxy(3,16); cout<<" saved of the trouble of specifically saving your
text.";
gotoxy(3,17); cout<<"¯ You can open DBs in it for viewing and make a
new DB.";
gotoxy(3,18); cout<<"¯ DB enteries once made can be edited by the EDIT
option.";
gotoxy(3,19); cout<<"¯ Enrollment Number is automatically assigned by
the program";
gotoxy(3,20); cout<<" to the student when his data is entered.";
gotoxy(3,22); cout<<"Press any key to continue...............";
getch();
}

if(s==2)
{
gotoxy(60,23);
cout<<"PAGE "<<s<<" OF 3";
21
Computer Science
Project Report

gotoxy(3,12); cout<<"¯ To open an existing DB, select option SEARCH


from the main menu.";
gotoxy(3,13); cout<<" You can searh the required students information
either ny his/her ";
gotoxy(3,14); cout<<" name or by Enrollment no. Basic information will
be displayed.Personal";
gotoxy(3,15); cout<<" information is password secured.";
gotoxy(3,16); cout<<"¯ You can delete the information with the DELETE
option.";
gotoxy(3,17); cout<<"¯ Everytime you open, exit or use any option in the
program,";
gotoxy(3,18); cout<<" a backup of the database is created with the
updated data.";
gotoxy(3,22); cout<<"Press any key to contiue...............";
getch();
}

if(s==3)
{
gotoxy(60,23);
cout<<"PAGE "<<s<<" OF 3";
gotoxy(3,12); cout<<"¯ This Program has been built completely in TURBO
C++ VER. 3.0";
gotoxy(3,14); cout<<" Author: KUSH BHAGAT";
gotoxy(3,15); cout<<" Dated : 23rd November 2009";
gotoxy(3,29); cout<<"Press any key to go back to Main..............";
getch();
}
}
cout<<endl<<endl<<" THANKS for using this program"<<"."; delay(400);
cout<<".";
delay(400); cout<<"!"; delay(800);
}

void time_norm()
{
textcolor(15);
int x;
gotoxy(1,2);
for (x=1;x<81;x++)
{ textcolor(6); cprintf("-"); }
time_t timer;
struct tm *tblock; //gets time of day
timer = time(NULL); //converts date/time to a structure
tblock = localtime(&timer);
gotoxy(22,1);
22
Computer Science
Project Report

textcolor(9);
cprintf("--------------------------------------\n");
gotoxy(23,2);
textcolor(15+128);
cprintf("Local time: %s",asctime(tblock));
gotoxy(22,3);
textcolor(9);
cprintf("--------------------------------------\n");
}

void time_main()
{
textcolor(15);
int x;
gotoxy(1,8);
for (x=1;x<81;x++)
{ textcolor(6); cprintf("-"); }
time_t timer;
struct tm *tblock; //gets time of day
timer = time(NULL); //converts date/time to a structure
tblock = localtime(&timer);
gotoxy(22,7);
textcolor(9);
cprintf("--------------------------------------\n");
gotoxy(23,8);
textcolor(15+128);
cprintf("Local time: %s",asctime(tblock));
gotoxy(22,9);
textcolor(9);
cprintf("--------------------------------------\n");
}

void desktop()
{
textcolor(15);
::desk++;
char starto[3],startg[3],ext[3];

starto[0]='v'; starto[1]='p'; starto[2]='s';


ext[0]='e'; ext[1]='x'; ext[2]='c';
_setcursortype(_NOCURSOR);
int dig=0,ex=0;
textcolor(15); clrscr();
gotoxy(18,10); textcolor(5); cprintf("|");
for (int x=1;x<46;x++)
{ textcolor(4); cprintf("-"); }
23
Computer Science
Project Report

textcolor(5); cprintf("|");
textcolor(14);
gotoxy(28,11); cprintf("VISHWA BHARATI PUBLIC SCHOOL\n");
gotoxy(33,12); cprintf("SECTOR-28 NOIDA \n");
gotoxy(34,13); cprintf("UTTAR PRADESH\n");
gotoxy(18,14); textcolor(5); cprintf("|");
for (x=1;x<46;x++)
{ textcolor(4); cprintf("-"); }
textcolor(5); cprintf("|");
time_norm();
gotoxy(33,7);

startg[0]=tolower(getch());
while ((startg[0]!='v')&&(startg[0]!='e'))
{ startg[0]=tolower(getch()); }
cout<<"WELCOME";

startg[1]=tolower(getch());
while ((startg[1]!='p')&&(startg[1]!='x'))
{ startg[1]=tolower(getch()); }
cout<<" TO ";

startg[2]=tolower(getch());
while ((startg[2]!='s')&&(startg[2]!='c'))
{ startg[2]=tolower(getch()); }
cout<<"VBPS!";

for(int s=0; s<=2; s++)


{
if(startg[s]==starto[s])
{ dig++; }
else if(startg[s]==ext[s])
{ ex++; }
}
delay(600);
if(ex==3)
{ exit(0); }
else if (dig==3)
{ return; }
else if(((dig>=0)&&(dig<=2))||((ex>=0)&&(ex<=2)))
{ desktop(); }
}

void main()
{
textcolor(15);
24
Computer Science
Project Report

backup();
if (::desk==0)
{ desktop(); }
clrscr();
start:
_setcursortype(_NOCURSOR);
textcolor(15);
clrscr();
gotoxy(19,1); textcolor(5); cprintf("|");

for (int x=1;x<46;x++)


{ textcolor(4); cprintf("-"); }

textcolor(5); cprintf("|");
gotoxy(33,2); textcolor(14); cprintf("STUDENT DATABASE\n");
gotoxy(28,3); cprintf("VISHWA BHARTI PUBLIC
SCHOOL\n");
gotoxy(33,4); cprintf("SECTOR-28, NOIDA\n");
gotoxy(34,5); cprintf("UTTAR PRADESH\n");
gotoxy(19,6); textcolor(5); cprintf("|");

for (x=1;x<46;x++)
{ textcolor(4); cprintf("-"); }

gotoxy(65,6); textcolor(5); cprintf("|");


gotoxy(46,8); cout<<"|";
gotoxy(46,8); cout<<"|";
time_main();

textcolor(15);
gotoxy(4,11); cprintf("Students Information");
gotoxy(4,12); cprintf("Add a new Student's Information");
gotoxy(4,13); cprintf("Edit existing Information");
gotoxy(4,14); cprintf("Delete Information");
gotoxy(4,15); cprintf("Delete Complete Information");
gotoxy(4,16); cprintf("Use Backup");
gotoxy(4,17); cprintf("Help");
gotoxy(4,18); cprintf("Desktop");
gotoxy(1,20); textcolor(5); cprintf("|");

for (x=1;x<79;x++)
{ textcolor(4); cprintf("-"); }

textcolor(5); cprintf("|");
int v , p=1 , y=11;
textcolor(3);
25
Computer Science
Project Report

for(int t=y;t<=y+7;t++)
{ gotoxy(1,t); cprintf("Ì"); }
textcolor(10+128);
gotoxy(2,y); cprintf("> "); //272
v=getch();
do
{
textcolor(10+128);
if ((y==18)&&(v==80)&&(p==8))
{
gotoxy(2,y); cout<<char(255);
p=1;
y=11;
gotoxy(2,y); cprintf("> ");
v=getch();
}
else if((y==11)&&(v==72)&&(p==1))
{
gotoxy(2,y); cout<<char(255);
p=8;
y=18;
gotoxy(2,y); cprintf("> ");
v=getch();
}

switch (v)
{
case 80:
{
gotoxy(2,y); cout<<char(255);
y++;
gotoxy(2,y); cprintf("> ");
p++;
break;
}
case 72:
{
gotoxy(2,y); cout<<char(255);
y--;
gotoxy(2,y); cprintf("> ");
p--;
break;
}
}
if(v!=13)
{ v=getch(); }
26
Computer Science
Project Report

}while(v!=13);
gotoxy(2,y); cout<<char(255);

switch(p)
{
case 1:
{
check();
textcolor(15);
view_info.getdata();
break;
}

case 2:
{
textcolor(15);
clrscr();
time_norm();
gotoxy(1,5);
pass();
if(::ctr_pas>0)
{ enter_data(); break; }
else
{
gotoxy(64,25);
cout<<"LOADING"<<"."; delay(400); cout<<"."; delay(400); cout<<".";
delay(400);
main();
}
break;
}

case 3:
{
check();
textcolor(15);
clrscr();
time_norm();
gotoxy(1,5);
pass();
if(::ctr_pas>0)
{ edit_data(); break; }
else
{
gotoxy(64,25);
27
Computer Science
Project Report

cout<<"LOADING"<<"."; delay(400); cout<<"."; delay(400); cout<<".";


delay(400);
main();
}
v=0;
break;
}

case 4:
{
textcolor(15);
clrscr();
time_norm();
gotoxy(1,5);
check();
pass();
if(::ctr_pas>0)
{
del();
break;
}
else
{
gotoxy(64,25);
cout<<"LOADING"<<"."; delay(400); cout<<"."; delay(400); cout<<".";
delay(400);
main();
}
break;
}

case 5:
{
char in;
textcolor(15);
clrscr();
time_norm();
gotoxy(1,5);
check();
cout<<"Are you sure you want to Delete Complete DB. Press enter if
yes.\n";
in=getch();
if (int(in)==13)
{
pass();
del_db();
28
Computer Science
Project Report

}
break;
}
case 6:
{
textcolor(15);
char q;
gotoxy(4,22);
cprintf("ARE YOU SURE YOU WANT TO UPDATE THE CURRENT DB
FROM BACKUP FILE (y/n)? ");
q=tolower(getche());
cout<<endl;
if (q=='y')
{
backup();
cprintf(" UPDATED! PRESS ANY KEY TO GET BACK TO MENU.");
getch();
}
else
{
cprintf(" PRESS ANY KEY TO GET BACK TO MENU. ");
getch();
}
break;
}

case 7:
{
textcolor(15);
help();
break;
}

case 8:
{
textcolor(15);
gotoxy(64,25);
cout<<"LOADING"<<"."; delay(400); cout<<"."; delay(400); cout<<".";
delay(400);
::desk=0;
main();
break;
}
}
backup();
goto start; }
29
Computer Science
Project Report

OUTPUT SCREENS

SCREEN 1: DESKTOP
------------------------------------------------
--------------------------------Local time: Mon Nov 23 11:10:35 2009--------------------------------
------------------------------------------------

WELCOME TO VBPS!
|-----------------------------------------------------------------------------------|
VISHWA BHARATI PUBLIC SCHOOL
SEC-28 NOIDA
UTTAR PRADESH
|-----------------------------------------------------------------------------------|

SCREEN 2: MENU
|-----------------------------------------------------------------------------------|
STUDENT DATABASE
VISHWA BHARATI PUBLIC SCHOOL
SEC-28 NOIDA
UTTAR PRADESH
|-----------------------------------------------------------------------------------|
-------------------------------------------------
----------------------------------Local time: Mon Nov 23 11:13:42 2009----------------------------------
-------------------------------------------------

╠> Students Information


╠ Add a new Student's Information
╠ Edit existing Information
╠ Delete Information
╠ Delete Complete Information
╠ Use Backup
╠ Help
╠ Desktop

|-------------------------------------------------------------------------------------------------------------------|
30
Computer Science
Project Report

SCREEN 3: STUDENT’S INFORMATION


|-----------------------------------------------------------------------------------|
STUDENT DATABASE
VISHWA BHARATI PUBLIC SCHOOL
SEC-28 NOIDA
UTTAR PRADESH
|-----------------------------------------------------------------------------------|
-------------------------------------------------
----------------------------------Local time: Mon Nov 23 11:13:42 2009----------------------------------
-------------------------------------------------

╠ Students Information
╠ Add a new Student's Information
╠ Edit existing Information
╠ Delete Information
╠ Delete Complete Information
╠ Use Backup
╠ Help
╠ Desktop

|-------------------------------------------------------------------------------------------------------------------|

Search according to (n)ame or Enr(o)llment No.: n…

SCREEN 4: STUDENT’S INFORMATION


------------------------------------------------
----------------------------------Local time: Mon Nov 23 11:30:49 2009----------------------------------
------------------------------------------------
Enter Name: KUSH
1. Student's Name: KUSH
Class: XII C
Course:
Roll No.: 16

Press 'y' to view the students personal information:


WARNING: THIS INFO IS OLNY FOR THE STAFF: Y...
Enter Pin: ****

SCREEN 5: PASSWORD VERIFICATION


------------------------------------------------
----------------------------------Local time: Mon Nov 23 11:32:09 2009----------------------------------
------------------------------------------------
31
Computer Science
Project Report

Enter Pin: ****

SCREEN 6: STUDENT’S INFORMATION


------------------------------------------------
----------------------------------Local time: Mon Nov 23 11:33:44 2009----------------------------------
------------------------------------------------

Enter Enrollment No.: 1

Student's Name: KUSH BHAGAT


Class: XII C
Course:
Stream.: SCINCE
Enrol .No.: 1
Father's Name: SATYA NAND BHAGAT
Mother's Name: SEEMA BHAGAT
Roll No.: 16
Address: D-36, SECTOR-49, NOIDA-201304, U.P.
Ph.No.: 9899489198

Press any key to go back to main menu.


32
Computer Science
Project Report

SCREEN 7: ENTER DATA


------------------------------------------------
---------------------------------Local time: Mon Nov 23 11:26:58 2009---------------------------------
------------------------------------------------
Enter Data(y/n): Y
FIRST RECORD! ENROLLMENT GRANTED! YOUR ENROLLMENT NO. IS: 1
Student's Name: KUSH BHAGAT
Class: XII C
Course:
Stream: SCIENCE
Father's Name: SATYA NAND BHAGAT
Mother's Name: SEEMA BHAGAT
Roll No.: 16
Address: D-36, SECTOR-49, NOIDA-201304, U.P.
Ph.No.: 9899489198

SCREEN 8: EDIT DATA


-----------------------------------------------
---------------------------------Local time: Mon Nov 23 11:40:55 2009---------------------------------
-----------------------------------------------
Student's Name: KUSH BHAGAT
Course:
Stream.: SCIENCE
Enrol.No.: 1
Father's Name: SATYA NAND BHAGAT
Mother's Name: SEEMA BHAGAT
Roll No.: 16
Address: D-56, SECTOR-125, NOIDA
Ph.No.: 9899347935
Do you want to continue(y/n): y
Student's Name : KUSH BHAGAT
Course:
Stream.: SCIENCE
Father's Name: SATYA NAND BHAGAT
Mother's Name: SEEMA BHAGAT
Roll No.: 16
Address: D-56, SECTOR-125, NOIDA
Press enter to retain address otherwise space.
Ph.No.: 9899489198
Press enter to retain phone no. otherwise space.
Ph.No.: 9899347935
33
Computer Science
Project Report

SCREEN 9: DELETE INFORMATION


------------------------------------------------
----------------------------------Local time: Mon Nov 23 11:44:18 2009----------------------------------
------------------------------------------------

Enter Enrollment No.:1


Are you sure you want to delete Enrollment No. 1 (y/n): Y
Student's Name: KUSH BHAGAT
Class: XII
Course:
Stream.: SCIENCE
Enrol.No.: 1Father's Name: SATYA NAND BHAGAT
Mother's Name: SEEMA BHAGAT
Roll No.: 16
Address: D-56, SECTOR-125, NOIDA
Ph.No.: 9899347935

Are you sure you want to delete Enrollment No. 1 (y/n): Y

Deleted. Press any key to go back to main.

SCREEN 10.1: DELETE COMPLETE INFORMATION


------------------------------------------------
----------------------------------Local time: Mon Nov 23 11:46:40 2009----------------------------------
------------------------------------------------

Are you sure you want to Delete Complete DB. Press enter if yes.
Enter Pin: ****

SCREEN 10.2: DELETE COMPLETE INFORMATION


------------------------------------------------
----------------------------------Local time: Mon Nov 23 11:48:40 2009----------------------------------
------------------------------------------------

PRESS ENTER TO DELETE COMPLETE DATABASE.


DO YOU WANT TO DELETE BACK UP FILE ALSO. PRESS ENTER TO DO SO.
34
Computer Science
Project Report

SCREEN 11: USE BACKUP


|-----------------------------------------------------------------------------------|
STUDENT DATABASE
VISHWA BHARATI PUBLIC SCHOOL
SEC-28 NOIDA
UTTAR PRADESH
|-----------------------------------------------------------------------------------|
--------------------------------------------------
----------------------------------Local time: Mon Nov 23 11:49:06 2009----------------------------------
--------------------------------------------------
╠ Students Information
╠ Add a new Student's Information
╠ Edit existing Information
╠ Delete Information
╠ Delete Complete Information
╠ Use Backup
╠ Help
╠ Desktop
|-------------------------------------------------------------------------------------------------------------------|
ARE YOU SURE YOU WANT TO UPDATE THE CURRENT DB FROM BACKUP FILE (y/n)? Y
UPDATED! PRESS ANY KEY TO GET BACK TO MENU.

SCREEN 12.1: HELP


|-----------------------------------------------------------------------------------|
STUDENT DATABASE
VISHWA BHARATI PUBLIC SCHOOL
SEC-28 NOIDA
UTTAR PRADESH
|-----------------------------------------------------------------------------------|
-----------------------------------------------
----------------------------------Local time: Mon Nov 23 11:54:03 2009----------------------------------
-----------------------------------------------
» This Program is about College Student Database (DB) Management.
» To create a new DB, simply select the ADD option from the menu.
» Enter the required information of the student and get going.
» Text editor automatically saves each character you type in, so you are
saved of the trouble of specifically saving your text.
» DB enteries once made can be edited by the EDIT option.
» Enrollment Number is automatically assigned by the program
to the student when his data is entered.
Press any key to continue...............
PAGE 1 OF 3

SCREEN 12.2: HELP


|-----------------------------------------------------------------------------------|
STUDENT DATABASE
35
Computer Science
Project Report

VISHWA BHARATI PUBLIC SCHOOL


SEC-28 NOIDA
UTTAR PRADESH
|-----------------------------------------------------------------------------------|
-----------------------------------------------
----------------------------------Local time: Mon Nov23 11:54:03 2009----------------------------------
-----------------------------------------------

» To open an existing DB, select option SEARCH from the main menu.
You can searh the required students information either ny his/her
name or by Enrollment no. Basic information will be displayed.Personal
Information is password secured.
» You can delete the information with the DELETE option.
» Everytime you open, exit or use any option in the program,
a backup of the database is created with the updated data.

Press any key to contiue...............


PAGE 2 OF 3

SCREEN 12.3: HELP


|-----------------------------------------------------------------------------------|
STUDENT DATABASE
VISHWA BHARATI PUBLIC SCHOOL
SEC-28 NOIDA
UTTAR PRADESH
|-----------------------------------------------------------------------------------|
-----------------------------------------------
---------------------------------Local time: Mon Nov23 11:54:03 2009--------------------------------
-----------------------------------------------

» This Program has been built completely in TURBO C++ VER. 3.0

Author: Kush Bhagat

Dated : 23rd November 2009


Press any key to go back to Main..............

PAGE 3 OF 3
36
Computer Science
Project Report

BIBLOGRAPHY

• DATA STRUCTURES BY G.S. BALUJA


• OOP’s IN TURBO C++ BY ROBERT LAFORE
• COMPUTER SCIENCE BY SUMITA ARORA
37
Computer Science
Project Report

Anda mungkin juga menyukai