SlideShare ist ein Scribd-Unternehmen logo
1 von 29
Department of Computer Science Delhi Public School, Udaipur (Raj) - 313001 Page 1
Department of Computer Science Delhi Public School, Udaipur (Raj) - 313001 Page 2
Academics Management
Subject : Computer Science (083)
Session : 2012-2013
CreatedBy: Guidedby:
Adityasingh V K Tiwari
Department of Computer Science Delhi Public School, Udaipur (Raj) - 313001 Page 3
Certificate
This is to certify that this project report entitled Airport
Management has been prepared by S. Vijay of class XII
from DPS, Udaipur.
He/ she has put his/ her sincere efforts for the
collection of data and performance of experiment for
the project successfully under my supervision
Neeru Tandon Vinay Krishan Tiwari
Principal PGT (IP & CS )
DPS, Udaipur
Department of Computer Science Delhi Public School, Udaipur (Raj) - 313001 Page 4
Acknowledgement
I feel immense pleasure and deep feeling
gratitude towards
Mr Vinay K Tiwari of Delhi Public School, Udaipur
for his skillful guidance , constructive and
valuable suggestions with encouraging co-
operation for my project, which not merely helped
but enable me to give effort towards this project.
I am also thankful to Ms Neeru Tandon, Principal
Delhi Public School, Udaipur for her
encouragement and valuable suggestions given
time to time. I also extend my thanks to all
colleagues and friends for their valuable
assistance and kind co-operation during the
course of this investigation.
Aditya singh
Department of Computer Science Delhi Public School, Udaipur (Raj) - 313001 Page 5
Preface
Projectmay have one, two or three objectives.And each objective has
one or more activities. The work plan answers these questions:
• What resources will you need?
• What activities have you planned?
• What is the timeline for each activity?
• What is the product from each activity?
• Who is responsible forthe activity?
• What is the result for each objective?
Evaluation is a planning term for finding out how things are going and
making decisions about what to do next. Evaluations serve as a tool for
reviewing your project.Evaluation enables you to learn from experience
so that you can do a better job next time. It also shows your funder what
you did and how successfulyour projectwas.
The evaluation plan shows how you plan to collectand analyze
information while the project is operating.
Outcomes are changes, results, impacts or consequences of the project
activities. Outcomes representthe impact that a projecthas on people,
programs or institutions.
Qualitative evaluation is an assessmentprocessthat answers the
question “How well did we do?”
Quantitative evaluation is an assessmentprocessthat answers the
question “How muchdid we do?”
Implementationis the phase in the projectwhen you begin your
activities. Your activities should help you reach your objectives
Department of Computer Science Delhi Public School, Udaipur (Raj) - 313001 Page 6
Source Code
Department of Computer Science Delhi Public School, Udaipur (Raj) - 313001 Page 7
//***********************************************************************************
// AcademicsManagement:
// HEADER FILES USED IN THE PROJECT:STUDENT REPORT CARD
// Made by S.Vijay and Aditya Singh
//***********************************************************************************
#include<fstream.h>
#include<iomanip.h>
#include<stdio.h>
#include<conio.h>
//***************************************************************
// CLASSES USED IN THE PROJECT
//****************************************************************
classstudent
{
introllno;
char name[50];
intp_marks, c_marks,m_marks, e_marks,cs_marks;
floatper;
char grade;
voidcalculate();//functiontocalculate grade
public:
Department of Computer Science Delhi Public School, Udaipur (Raj) - 313001 Page 8
voidgetdata(); //functiontoacceptdata from user
voidshowdata(); //functiontoshow dataon screen
voidshow_tabular();
intretrollno();
}; //classendshere
voidstudent::calculate()
{
per=(p_marks+c_marks+m_marks+e_marks+cs_marks)/5.0;
if(per>=60)
grade='A';
else if(per>=50)
grade='B';
else if(per>=33)
grade='C';
else
grade='F';
}
voidstudent::getdata()
{
cout<<"nEnterThe roll numberof student";
cin>>rollno;
cout<<"nnEnterThe Name of student";
Department of Computer Science Delhi Public School, Udaipur (Raj) - 313001 Page 9
gets(name);
cout<<"nEnterThe marks inphysicsout of 100 : ";
cin>>p_marks;
cout<<"nEnterThe marks inchemistryoutof 100 : ";
cin>>c_marks;
cout<<"nEnterThe marks inmaths out of 100 : ";
cin>>m_marks;
cout<<"nEnterThe marks inenglishout of 100 : ";
cin>>e_marks;
cout<<"nEnterThe marks incomputerscience outof 100 : ";
cin>>cs_marks;
calculate();
}
voidstudent::showdata()
{
cout<<"nRoll numberof student:"<<rollno;
cout<<"nName of student:"<<name;
cout<<"nMarks inPhysics: "<<p_marks;
cout<<"nMarks inChemistry:"<<c_marks;
cout<<"nMarks inMaths : "<<m_marks;
cout<<"nMarks inEnglish: "<<e_marks;
cout<<"nMarks inComputerScience :"<<cs_marks;
cout<<"nPercentage of studentis :"<<per;
cout<<"nGrade of studentis:"<<grade;
Department of Computer Science Delhi Public School, Udaipur (Raj) - 313001 Page 10
}
voidstudent::show_tabular()
{
cout<<rollno<<setw(6)<<"
"<<name<<setw(10)<<p_marks<<setw(4)<<c_marks<<setw(4)<<m_marks<<setw(4)<<e_marks<<setw(4
)<<cs_marks<<setw(6)<<per<<setw(6)<<""<<grade<<endl;
}
int student::retrollno()
{
returnrollno;
}
//***************************************************************
// functiondeclaration
//****************************************************************
voidwrite_student(); //write the recordinbinaryfile
voiddisplay_all(); //readall recordsfrom binaryfile
voiddisplay_sp(int); //acceptrollnoandread recordfrombinaryfile
voidmodify_student(int); //acceptrollnoandupdate recordof binaryfile
voiddelete_student(int); //acceptrollnoanddelete selectedrecordsfrombinaryfile
voidclass_result(); //displayall recordsintabularformatfrombinaryfile
voidresult(); //displayresultmenu
Department of Computer Science Delhi Public School, Udaipur (Raj) - 313001 Page 11
voidintro(); //displaywelcome screen
voidentry_menu(); //displayentrymenuonscreen
//***************************************************************
// THE MAIN FUNCTION OF PROGRAM
//****************************************************************
intmain()
{
char ch;
cout.setf(ios::fixed|ios::showpoint);
cout<<setprecision(2); //programoutputsdecimal numbertotwodecimal places
clrscr();
intro();
do
{
clrscr();
cout<<"nnntMAIN MENU";
cout<<"nnt01.RESULT MENU";
cout<<"nnt02.ENTRY/EDIT MENU";
cout<<"nnt03.EXIT";
cout<<"nntPlease SelectYourOption(1-3) ";
cin>>ch;
Department of Computer Science Delhi Public School, Udaipur (Raj) - 313001 Page 12
clrscr();
switch(ch)
{
case '1': result();
break;
case '2': entry_menu();
break;
case '3':
break;
default:cout<<"a";
}
}while(ch!='3');
return0;
}
//***************************************************************
// functiontowrite infile
//****************************************************************
voidwrite_student()
{
studentst;
ofstreamoutFile;
outFile.open("student.dat",ios::binary|ios::app);
st.getdata();
Department of Computer Science Delhi Public School, Udaipur (Raj) - 313001 Page 13
outFile.write((char*) &st,sizeof(student));
outFile.close();
cout<<"nnStudentrecordHasBeenCreated";
cin.ignore();
getch();
}
//***************************************************************
// function toread all recordsfromfile
//****************************************************************
voiddisplay_all()
{
studentst;
ifstreaminFile;
inFile.open("student.dat",ios::binary);
if(!inFile)
{
cout<<"File couldnotbe open!! PressanyKey...";
getch();
return;
}
cout<<"nnnttDISPLAYALLRECORD !!!nn";
while(inFile.read((char*) &st,sizeof(student)))
Department of Computer Science Delhi Public School, Udaipur (Raj) - 313001 Page 14
{
st.showdata();
cout<<"nn====================================n";
}
inFile.close();
getch();
}
//***************************************************************
// functiontoread specificrecordfromfile
//****************************************************************
voiddisplay_sp(intn)
{
studentst;
ifstreaminFile;
inFile.open("student.dat",ios::binary);
if(!inFile)
{
cout<<"File couldnotbe open!! PressanyKey...";
getch();
return;
}
Department of Computer Science Delhi Public School, Udaipur (Raj) - 313001 Page 15
intflag=0;
while(inFile.read((char*) &st,sizeof(student)))
{
if(st.retrollno()==n)
{
st.showdata();
flag=1;
}
}
inFile.close();
if(flag==0)
cout<<"nnrecordnotexist";
getch();
}
//***************************************************************
// functiontomodifyrecordof file
//****************************************************************
voidmodify_student(intn)
{
intfound=0;
studentst;
fstreamFile;
Department of Computer Science Delhi Public School, Udaipur (Raj) - 313001 Page 16
File.open("student.dat",ios::binary|ios::in|ios::out);
if(!File)
{
cout<<"File couldnotbe open!! PressanyKey...";
getch();
return;
}
while(File.read((char*) &st,sizeof(student))&&found==0)
{
if(st.retrollno()==n)
{
st.showdata();
cout<<"nnPleaseEnterThe New Detailsof student"<<endl;
st.getdata();
int pos=(-1)*sizeof(st);
File.seekp(pos,ios::cur);
File.write((char*) &st,sizeof(student));
cout<<"nntRecordUpdated";
found=1;
}
}
File.close();
if(found==0)
Department of Computer Science Delhi Public School, Udaipur (Raj) - 313001 Page 17
cout<<"nnRecordNot Found";
getch();
}
//***************************************************************
// functiontodelete recordof file
//****************************************************************
voiddelete_student(intn)
{
studentst;
ifstreaminFile;
inFile.open("student.dat",ios::binary);
if(!inFile)
{
cout<<"File couldnotbe open!! PressanyKey...";
getch();
return;
}
ofstreamoutFile;
outFile.open("Temp.dat",ios::out);
inFile.seekg(0,ios::beg);
while(inFile.read((char*) &st,sizeof(student)))
{
if(st.retrollno()!=n)
Department of Computer Science Delhi Public School, Udaipur (Raj) - 313001 Page 18
{
outFile.write((char*) &st,sizeof(student));
}
}
outFile.close();
inFile.close();
remove("student.dat");
rename("Temp.dat","student.dat");
cout<<"nntRecordDeleted..";
getch();
}
//***************************************************************
// functiontodisplayall studentsgrade report
//****************************************************************
voidclass_result()
{
studentst;
ifstreaminFile;
inFile.open("student.dat",ios::binary);
if(!inFile)
{
cout<<"File couldnotbe open!! PressanyKey...";
Department of Computer Science Delhi Public School, Udaipur (Raj) - 313001 Page 19
getch();
return;
}
cout<<"nnttALLSTUDENTSRESULT nn";
cout<<"==========================================================n";
cout<<"R.No Name P C M E CS %age Grade"<<endl;
cout<<"==========================================================n";
while(inFile.read((char*) &st,sizeof(student)))
{
st.show_tabular();
}
getch();
inFile.close();
}
//***************************************************************
// functiontodisplayresultmenu
//****************************************************************
voidresult()
{
char ch;
intrno;
Department of Computer Science Delhi Public School, Udaipur (Raj) - 313001 Page 20
cout<<"nnntRESULTMENU";
cout<<"nnnt1.ClassResult";
cout<<"nnt2.StudentReportCard";
cout<<"nnt3.Back to Main Menu";
cout<<"nnntEnterChoice (1/2/3)?";
cin>>ch;
clrscr();
switch(ch)
{
case '1' : class_result();break;
case '2' : cout<<"nntEnterRoll NumberOf Student:";cin>>rno;
display_sp(rno);break;
case '3' : break;
default:cout<<"a";
}
}
//***************************************************************
// INTRODUCTION FUNCTION
//****************************************************************
voidintro()
{
cout<<"nnntt STUDENT";
cout<<"nnttREPORTCARD";
Department of Computer Science Delhi Public School, Udaipur (Raj) - 313001 Page 21
cout<<"nntt PROJECT";
cout<<"nnntMADEBY : S.VIJAYandADITYA SINGH";
cout<<"ntSCHOOL: DELHI PUBLIC SCHOOL UDAIPUR";
getch();
}
//***************************************************************
// ENTRY / EDIT MENU FUNCTION
//****************************************************************
voidentry_menu()
{
char ch;
intnum;
clrscr();
cout<<"nnntENTRYMENU";
cout<<"nnt1.CREATESTUDENT RECORD";
cout<<"nnt2.DISPLAYALLSTUDENTS RECORDS";
cout<<"nnt3.SEARCHSTUDENT RECORD ";
cout<<"nnt4.MODIFYSTUDENT RECORD";
cout<<"nnt5.DELETE STUDENT RECORD";
cout<<"nnt6.BACKTOMAIN MENU";
cout<<"nntPlease EnterYourChoice (1-6) ";
cin>>ch;
clrscr();
Department of Computer Science Delhi Public School, Udaipur (Raj) - 313001 Page 22
switch(ch)
{
case '1':write_student();break;
case '2':display_all();break;
case '3':cout<<"nntPlease EnterThe roll number";cin>>num;
display_sp(num);break;
case '4':cout<<"nntPlease EnterThe roll number";cin>>num;
modify_student(num);break;
case '5':cout<<"nntPlease EnterThe roll number";cin>>num;
delete_student(num);break;
case '6':break;
default:cout<<"a"; entry_menu();
}
}
//***********************************************************************************
// END OFTHE PROJECT: THANKINGA LOT TO MR VINAYTIWARIANDMANAGEMENT OF DPS
UDAIPUR
//***********************************************************************************
Department of Computer Science Delhi Public School, Udaipur (Raj) - 313001 Page 23
OUT PUT
Department of Computer Science Delhi Public School, Udaipur (Raj) - 313001 Page 24
Department of Computer Science Delhi Public School, Udaipur (Raj) - 313001 Page 25
Department of Computer Science Delhi Public School, Udaipur (Raj) - 313001 Page 26
Department of Computer Science Delhi Public School, Udaipur (Raj) - 313001 Page 27
Department of Computer Science Delhi Public School, Udaipur (Raj) - 313001 Page 28
Bibliography
Computer Science C++ bySumita Arora Class XII, Dhapat Rai & C.
(P) LTD. Educational & Technical Publisher, 4576/15
Agrawal Road DaryaGanj, New Delhi - 110002
Saraswati Computer Science C++ by Reeta Sahoo, Gagan Sahoo
(MCA), Saraswati House Pvt. Ltd. Educational
Publishers New Delhi - 110002
Move fast with C++ by Sumita Arora, Dhapat Rai & C. (P) LTD.
Educational & Technical Publisher, 4576/15 Agrawal
Road DaryaGanj, New Delhi - 110002
Computer Networks byAndrew S Tanenbaum(Vrije Universiteit
Amsterdam, The Netherlands), Prentice – Hall of
India Private Limited, New Delhi - 110001
New Concepts in Computer Science (for CBSE Class XII) by JB
Dixit, Laxmi Publications (P) Ltd. Ansari Road
DaryaGanj, New Delhi - 110002
Department of Computer Science Delhi Public School, Udaipur (Raj) - 313001 Page 29

Weitere ähnliche Inhalte

Ähnlich wie Aditya Singh Final Project(Academics Management)

International Brochure Engineering_Final_26 Mar
International Brochure Engineering_Final_26 MarInternational Brochure Engineering_Final_26 Mar
International Brochure Engineering_Final_26 Mar
Abedalrhman Habashneh
 
2011 Symposium -- Learning Analytics
2011 Symposium -- Learning Analytics2011 Symposium -- Learning Analytics
2011 Symposium -- Learning Analytics
Patrick Lowenthal
 
10-10-04_04 Tim Lawrence Skill Connect Assessments
10-10-04_04 Tim Lawrence Skill Connect Assessments10-10-04_04 Tim Lawrence Skill Connect Assessments
10-10-04_04 Tim Lawrence Skill Connect Assessments
Darrell Caron
 
Benchmarking Mini-series Part #2: Conducting Quick, Cost-Effective UX Benchma...
Benchmarking Mini-series Part #2: Conducting Quick, Cost-Effective UX Benchma...Benchmarking Mini-series Part #2: Conducting Quick, Cost-Effective UX Benchma...
Benchmarking Mini-series Part #2: Conducting Quick, Cost-Effective UX Benchma...
UserZoom
 

Ähnlich wie Aditya Singh Final Project(Academics Management) (20)

computer science project
computer science projectcomputer science project
computer science project
 
Human Resource Management!
Human Resource Management!Human Resource Management!
Human Resource Management!
 
AN EMPLOYEE PERCEPTION TOWARDS HR PRACTICES
AN EMPLOYEE PERCEPTION TOWARDS HR PRACTICESAN EMPLOYEE PERCEPTION TOWARDS HR PRACTICES
AN EMPLOYEE PERCEPTION TOWARDS HR PRACTICES
 
International Brochure Engineering_Final_26 Mar
International Brochure Engineering_Final_26 MarInternational Brochure Engineering_Final_26 Mar
International Brochure Engineering_Final_26 Mar
 
2011 Symposium -- Learning Analytics
2011 Symposium -- Learning Analytics2011 Symposium -- Learning Analytics
2011 Symposium -- Learning Analytics
 
Big data project
Big data projectBig data project
Big data project
 
Graduation marketing summer internship project
Graduation marketing summer internship projectGraduation marketing summer internship project
Graduation marketing summer internship project
 
Instructional Design
Instructional DesignInstructional Design
Instructional Design
 
10-10-04_04 Tim Lawrence Skill Connect Assessments
10-10-04_04 Tim Lawrence Skill Connect Assessments10-10-04_04 Tim Lawrence Skill Connect Assessments
10-10-04_04 Tim Lawrence Skill Connect Assessments
 
student-data-management-1-2.doc
student-data-management-1-2.docstudent-data-management-1-2.doc
student-data-management-1-2.doc
 
Dice live training program
Dice live training programDice live training program
Dice live training program
 
manoj_new
manoj_newmanoj_new
manoj_new
 
Data Clustering in Education for Students
Data Clustering in Education for StudentsData Clustering in Education for Students
Data Clustering in Education for Students
 
E learning project report (Yashraj Nigam)
E learning project report (Yashraj Nigam)E learning project report (Yashraj Nigam)
E learning project report (Yashraj Nigam)
 
Benchmarking Mini-series Part #2: Conducting Quick, Cost-Effective UX Benchma...
Benchmarking Mini-series Part #2: Conducting Quick, Cost-Effective UX Benchma...Benchmarking Mini-series Part #2: Conducting Quick, Cost-Effective UX Benchma...
Benchmarking Mini-series Part #2: Conducting Quick, Cost-Effective UX Benchma...
 
UCD WST February 20 2020
UCD WST February 20 2020UCD WST February 20 2020
UCD WST February 20 2020
 
Toppers Elearning Presentation
Toppers Elearning PresentationToppers Elearning Presentation
Toppers Elearning Presentation
 
Toppers Elearning Pres
Toppers Elearning PresToppers Elearning Pres
Toppers Elearning Pres
 
2015 nmc-presentation
2015 nmc-presentation2015 nmc-presentation
2015 nmc-presentation
 
Learning Metrics: Building Your Training Scorecard
Learning Metrics: Building Your Training ScorecardLearning Metrics: Building Your Training Scorecard
Learning Metrics: Building Your Training Scorecard
 

Aditya Singh Final Project(Academics Management)

  • 1. Department of Computer Science Delhi Public School, Udaipur (Raj) - 313001 Page 1
  • 2. Department of Computer Science Delhi Public School, Udaipur (Raj) - 313001 Page 2 Academics Management Subject : Computer Science (083) Session : 2012-2013 CreatedBy: Guidedby: Adityasingh V K Tiwari
  • 3. Department of Computer Science Delhi Public School, Udaipur (Raj) - 313001 Page 3 Certificate This is to certify that this project report entitled Airport Management has been prepared by S. Vijay of class XII from DPS, Udaipur. He/ she has put his/ her sincere efforts for the collection of data and performance of experiment for the project successfully under my supervision Neeru Tandon Vinay Krishan Tiwari Principal PGT (IP & CS ) DPS, Udaipur
  • 4. Department of Computer Science Delhi Public School, Udaipur (Raj) - 313001 Page 4 Acknowledgement I feel immense pleasure and deep feeling gratitude towards Mr Vinay K Tiwari of Delhi Public School, Udaipur for his skillful guidance , constructive and valuable suggestions with encouraging co- operation for my project, which not merely helped but enable me to give effort towards this project. I am also thankful to Ms Neeru Tandon, Principal Delhi Public School, Udaipur for her encouragement and valuable suggestions given time to time. I also extend my thanks to all colleagues and friends for their valuable assistance and kind co-operation during the course of this investigation. Aditya singh
  • 5. Department of Computer Science Delhi Public School, Udaipur (Raj) - 313001 Page 5 Preface Projectmay have one, two or three objectives.And each objective has one or more activities. The work plan answers these questions: • What resources will you need? • What activities have you planned? • What is the timeline for each activity? • What is the product from each activity? • Who is responsible forthe activity? • What is the result for each objective? Evaluation is a planning term for finding out how things are going and making decisions about what to do next. Evaluations serve as a tool for reviewing your project.Evaluation enables you to learn from experience so that you can do a better job next time. It also shows your funder what you did and how successfulyour projectwas. The evaluation plan shows how you plan to collectand analyze information while the project is operating. Outcomes are changes, results, impacts or consequences of the project activities. Outcomes representthe impact that a projecthas on people, programs or institutions. Qualitative evaluation is an assessmentprocessthat answers the question “How well did we do?” Quantitative evaluation is an assessmentprocessthat answers the question “How muchdid we do?” Implementationis the phase in the projectwhen you begin your activities. Your activities should help you reach your objectives
  • 6. Department of Computer Science Delhi Public School, Udaipur (Raj) - 313001 Page 6 Source Code
  • 7. Department of Computer Science Delhi Public School, Udaipur (Raj) - 313001 Page 7 //*********************************************************************************** // AcademicsManagement: // HEADER FILES USED IN THE PROJECT:STUDENT REPORT CARD // Made by S.Vijay and Aditya Singh //*********************************************************************************** #include<fstream.h> #include<iomanip.h> #include<stdio.h> #include<conio.h> //*************************************************************** // CLASSES USED IN THE PROJECT //**************************************************************** classstudent { introllno; char name[50]; intp_marks, c_marks,m_marks, e_marks,cs_marks; floatper; char grade; voidcalculate();//functiontocalculate grade public:
  • 8. Department of Computer Science Delhi Public School, Udaipur (Raj) - 313001 Page 8 voidgetdata(); //functiontoacceptdata from user voidshowdata(); //functiontoshow dataon screen voidshow_tabular(); intretrollno(); }; //classendshere voidstudent::calculate() { per=(p_marks+c_marks+m_marks+e_marks+cs_marks)/5.0; if(per>=60) grade='A'; else if(per>=50) grade='B'; else if(per>=33) grade='C'; else grade='F'; } voidstudent::getdata() { cout<<"nEnterThe roll numberof student"; cin>>rollno; cout<<"nnEnterThe Name of student";
  • 9. Department of Computer Science Delhi Public School, Udaipur (Raj) - 313001 Page 9 gets(name); cout<<"nEnterThe marks inphysicsout of 100 : "; cin>>p_marks; cout<<"nEnterThe marks inchemistryoutof 100 : "; cin>>c_marks; cout<<"nEnterThe marks inmaths out of 100 : "; cin>>m_marks; cout<<"nEnterThe marks inenglishout of 100 : "; cin>>e_marks; cout<<"nEnterThe marks incomputerscience outof 100 : "; cin>>cs_marks; calculate(); } voidstudent::showdata() { cout<<"nRoll numberof student:"<<rollno; cout<<"nName of student:"<<name; cout<<"nMarks inPhysics: "<<p_marks; cout<<"nMarks inChemistry:"<<c_marks; cout<<"nMarks inMaths : "<<m_marks; cout<<"nMarks inEnglish: "<<e_marks; cout<<"nMarks inComputerScience :"<<cs_marks; cout<<"nPercentage of studentis :"<<per; cout<<"nGrade of studentis:"<<grade;
  • 10. Department of Computer Science Delhi Public School, Udaipur (Raj) - 313001 Page 10 } voidstudent::show_tabular() { cout<<rollno<<setw(6)<<" "<<name<<setw(10)<<p_marks<<setw(4)<<c_marks<<setw(4)<<m_marks<<setw(4)<<e_marks<<setw(4 )<<cs_marks<<setw(6)<<per<<setw(6)<<""<<grade<<endl; } int student::retrollno() { returnrollno; } //*************************************************************** // functiondeclaration //**************************************************************** voidwrite_student(); //write the recordinbinaryfile voiddisplay_all(); //readall recordsfrom binaryfile voiddisplay_sp(int); //acceptrollnoandread recordfrombinaryfile voidmodify_student(int); //acceptrollnoandupdate recordof binaryfile voiddelete_student(int); //acceptrollnoanddelete selectedrecordsfrombinaryfile voidclass_result(); //displayall recordsintabularformatfrombinaryfile voidresult(); //displayresultmenu
  • 11. Department of Computer Science Delhi Public School, Udaipur (Raj) - 313001 Page 11 voidintro(); //displaywelcome screen voidentry_menu(); //displayentrymenuonscreen //*************************************************************** // THE MAIN FUNCTION OF PROGRAM //**************************************************************** intmain() { char ch; cout.setf(ios::fixed|ios::showpoint); cout<<setprecision(2); //programoutputsdecimal numbertotwodecimal places clrscr(); intro(); do { clrscr(); cout<<"nnntMAIN MENU"; cout<<"nnt01.RESULT MENU"; cout<<"nnt02.ENTRY/EDIT MENU"; cout<<"nnt03.EXIT"; cout<<"nntPlease SelectYourOption(1-3) "; cin>>ch;
  • 12. Department of Computer Science Delhi Public School, Udaipur (Raj) - 313001 Page 12 clrscr(); switch(ch) { case '1': result(); break; case '2': entry_menu(); break; case '3': break; default:cout<<"a"; } }while(ch!='3'); return0; } //*************************************************************** // functiontowrite infile //**************************************************************** voidwrite_student() { studentst; ofstreamoutFile; outFile.open("student.dat",ios::binary|ios::app); st.getdata();
  • 13. Department of Computer Science Delhi Public School, Udaipur (Raj) - 313001 Page 13 outFile.write((char*) &st,sizeof(student)); outFile.close(); cout<<"nnStudentrecordHasBeenCreated"; cin.ignore(); getch(); } //*************************************************************** // function toread all recordsfromfile //**************************************************************** voiddisplay_all() { studentst; ifstreaminFile; inFile.open("student.dat",ios::binary); if(!inFile) { cout<<"File couldnotbe open!! PressanyKey..."; getch(); return; } cout<<"nnnttDISPLAYALLRECORD !!!nn"; while(inFile.read((char*) &st,sizeof(student)))
  • 14. Department of Computer Science Delhi Public School, Udaipur (Raj) - 313001 Page 14 { st.showdata(); cout<<"nn====================================n"; } inFile.close(); getch(); } //*************************************************************** // functiontoread specificrecordfromfile //**************************************************************** voiddisplay_sp(intn) { studentst; ifstreaminFile; inFile.open("student.dat",ios::binary); if(!inFile) { cout<<"File couldnotbe open!! PressanyKey..."; getch(); return; }
  • 15. Department of Computer Science Delhi Public School, Udaipur (Raj) - 313001 Page 15 intflag=0; while(inFile.read((char*) &st,sizeof(student))) { if(st.retrollno()==n) { st.showdata(); flag=1; } } inFile.close(); if(flag==0) cout<<"nnrecordnotexist"; getch(); } //*************************************************************** // functiontomodifyrecordof file //**************************************************************** voidmodify_student(intn) { intfound=0; studentst; fstreamFile;
  • 16. Department of Computer Science Delhi Public School, Udaipur (Raj) - 313001 Page 16 File.open("student.dat",ios::binary|ios::in|ios::out); if(!File) { cout<<"File couldnotbe open!! PressanyKey..."; getch(); return; } while(File.read((char*) &st,sizeof(student))&&found==0) { if(st.retrollno()==n) { st.showdata(); cout<<"nnPleaseEnterThe New Detailsof student"<<endl; st.getdata(); int pos=(-1)*sizeof(st); File.seekp(pos,ios::cur); File.write((char*) &st,sizeof(student)); cout<<"nntRecordUpdated"; found=1; } } File.close(); if(found==0)
  • 17. Department of Computer Science Delhi Public School, Udaipur (Raj) - 313001 Page 17 cout<<"nnRecordNot Found"; getch(); } //*************************************************************** // functiontodelete recordof file //**************************************************************** voiddelete_student(intn) { studentst; ifstreaminFile; inFile.open("student.dat",ios::binary); if(!inFile) { cout<<"File couldnotbe open!! PressanyKey..."; getch(); return; } ofstreamoutFile; outFile.open("Temp.dat",ios::out); inFile.seekg(0,ios::beg); while(inFile.read((char*) &st,sizeof(student))) { if(st.retrollno()!=n)
  • 18. Department of Computer Science Delhi Public School, Udaipur (Raj) - 313001 Page 18 { outFile.write((char*) &st,sizeof(student)); } } outFile.close(); inFile.close(); remove("student.dat"); rename("Temp.dat","student.dat"); cout<<"nntRecordDeleted.."; getch(); } //*************************************************************** // functiontodisplayall studentsgrade report //**************************************************************** voidclass_result() { studentst; ifstreaminFile; inFile.open("student.dat",ios::binary); if(!inFile) { cout<<"File couldnotbe open!! PressanyKey...";
  • 19. Department of Computer Science Delhi Public School, Udaipur (Raj) - 313001 Page 19 getch(); return; } cout<<"nnttALLSTUDENTSRESULT nn"; cout<<"==========================================================n"; cout<<"R.No Name P C M E CS %age Grade"<<endl; cout<<"==========================================================n"; while(inFile.read((char*) &st,sizeof(student))) { st.show_tabular(); } getch(); inFile.close(); } //*************************************************************** // functiontodisplayresultmenu //**************************************************************** voidresult() { char ch; intrno;
  • 20. Department of Computer Science Delhi Public School, Udaipur (Raj) - 313001 Page 20 cout<<"nnntRESULTMENU"; cout<<"nnnt1.ClassResult"; cout<<"nnt2.StudentReportCard"; cout<<"nnt3.Back to Main Menu"; cout<<"nnntEnterChoice (1/2/3)?"; cin>>ch; clrscr(); switch(ch) { case '1' : class_result();break; case '2' : cout<<"nntEnterRoll NumberOf Student:";cin>>rno; display_sp(rno);break; case '3' : break; default:cout<<"a"; } } //*************************************************************** // INTRODUCTION FUNCTION //**************************************************************** voidintro() { cout<<"nnntt STUDENT"; cout<<"nnttREPORTCARD";
  • 21. Department of Computer Science Delhi Public School, Udaipur (Raj) - 313001 Page 21 cout<<"nntt PROJECT"; cout<<"nnntMADEBY : S.VIJAYandADITYA SINGH"; cout<<"ntSCHOOL: DELHI PUBLIC SCHOOL UDAIPUR"; getch(); } //*************************************************************** // ENTRY / EDIT MENU FUNCTION //**************************************************************** voidentry_menu() { char ch; intnum; clrscr(); cout<<"nnntENTRYMENU"; cout<<"nnt1.CREATESTUDENT RECORD"; cout<<"nnt2.DISPLAYALLSTUDENTS RECORDS"; cout<<"nnt3.SEARCHSTUDENT RECORD "; cout<<"nnt4.MODIFYSTUDENT RECORD"; cout<<"nnt5.DELETE STUDENT RECORD"; cout<<"nnt6.BACKTOMAIN MENU"; cout<<"nntPlease EnterYourChoice (1-6) "; cin>>ch; clrscr();
  • 22. Department of Computer Science Delhi Public School, Udaipur (Raj) - 313001 Page 22 switch(ch) { case '1':write_student();break; case '2':display_all();break; case '3':cout<<"nntPlease EnterThe roll number";cin>>num; display_sp(num);break; case '4':cout<<"nntPlease EnterThe roll number";cin>>num; modify_student(num);break; case '5':cout<<"nntPlease EnterThe roll number";cin>>num; delete_student(num);break; case '6':break; default:cout<<"a"; entry_menu(); } } //*********************************************************************************** // END OFTHE PROJECT: THANKINGA LOT TO MR VINAYTIWARIANDMANAGEMENT OF DPS UDAIPUR //***********************************************************************************
  • 23. Department of Computer Science Delhi Public School, Udaipur (Raj) - 313001 Page 23 OUT PUT
  • 24. Department of Computer Science Delhi Public School, Udaipur (Raj) - 313001 Page 24
  • 25. Department of Computer Science Delhi Public School, Udaipur (Raj) - 313001 Page 25
  • 26. Department of Computer Science Delhi Public School, Udaipur (Raj) - 313001 Page 26
  • 27. Department of Computer Science Delhi Public School, Udaipur (Raj) - 313001 Page 27
  • 28. Department of Computer Science Delhi Public School, Udaipur (Raj) - 313001 Page 28 Bibliography Computer Science C++ bySumita Arora Class XII, Dhapat Rai & C. (P) LTD. Educational & Technical Publisher, 4576/15 Agrawal Road DaryaGanj, New Delhi - 110002 Saraswati Computer Science C++ by Reeta Sahoo, Gagan Sahoo (MCA), Saraswati House Pvt. Ltd. Educational Publishers New Delhi - 110002 Move fast with C++ by Sumita Arora, Dhapat Rai & C. (P) LTD. Educational & Technical Publisher, 4576/15 Agrawal Road DaryaGanj, New Delhi - 110002 Computer Networks byAndrew S Tanenbaum(Vrije Universiteit Amsterdam, The Netherlands), Prentice – Hall of India Private Limited, New Delhi - 110001 New Concepts in Computer Science (for CBSE Class XII) by JB Dixit, Laxmi Publications (P) Ltd. Ansari Road DaryaGanj, New Delhi - 110002
  • 29. Department of Computer Science Delhi Public School, Udaipur (Raj) - 313001 Page 29