Beruflich Dokumente
Kultur Dokumente
PROJECT
MADE BY:
NAME : SHASHANK KUMAR
CLASS : XII A
ROLL NO. :
INDEX
CERTIFICATE
ACKNOWLEDGEMENT
ABOUT THE PROJECT
HEADER FILES USED
FUNCTIONS USED
FUNCTIONS USED IN CLASS
PROGRAM
OUTPUT
CERTIFICATE
Mr. Anurag
Computer teacher
ACKNOWLEDGEMENT
I would like to express my sincere gratitude to
my computer teacher Mr Anurag for his
vital support ,giudance and encouragement
without which this project could have not been
completed .I would also like to express my
gratitude to staff of the department of
computer of VPS Noida for their
support during this project
ABOUT THE PROJECT
The basic idea of this project is school
Report card making system.It consist of
entering ,modification and deletion of
student details in report card.It also
includes grades according to marks score by
Student.Further , modifying a record become
easy for editter.It also includes percentage
scored by student.
PROGRAM
//***************************************************************
//****************************************************************
#include<fstream.h>
#include<iomanip.h>
#include<stdio.h>
#include<conio.h>
//***************************************************************
//****************************************************************
class student
int rollno;
char name[50];
float per;
char grade;
public:
void show_tabular();
int retrollno();
void student::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';
void student::getdata()
cin>>rollno;
gets(name);
cin>>p_marks;
cin>>c_marks;
cin>>m_marks;
cin>>e_marks;
cin>>cs_marks;
calculate();
void student::showdata()
void student::show_tabular()
cout<<rollno<<setw(6)<<"
"<<name<<setw(10)<<p_marks<<setw(4)<<c_marks<<setw(4)<<m_marks<<setw(4)<<e_marks<<set
w(4)<<cs_marks<<setw(6)<<per<<setw(6)<<" "<<grade<<endl;
int student::retrollno()
return rollno;
//***************************************************************
// function declaration
//****************************************************************
void display_sp(int); //accept rollno and read record from binary file
void delete_student(int); //accept rollno and delete selected records from binary file
void class_result(); //display all records in tabular format from binary file
//****************************************************************
int main()
char ch;
cout.setf(ios::fixed|ios::showpoint);
clrscr();
intro();
do
clrscr();
cout<<"\n\n\n\tMAIN MENU";
cout<<"\n\n\t03. EXIT";
cin>>ch;
clrscr();
switch(ch)
break;
break;
case '3':
break;
default :cout<<"\a";
}while(ch!='3');
return 0;
}
//***************************************************************
//****************************************************************
void write_student()
student st;
ofstream outFile;
outFile.open("student.dat",ios::binary|ios::app);
st.getdata();
outFile.close();
cin.ignore();
getch();
//***************************************************************
//****************************************************************
void display_all()
student st;
ifstream inFile;
inFile.open("student.dat",ios::binary);
if(!inFile)
getch();
return;
st.showdata();
cout<<"\n\n====================================\n";
inFile.close();
getch();
//***************************************************************
//****************************************************************
void display_sp(int n)
student st;
ifstream inFile;
inFile.open("student.dat",ios::binary);
if(!inFile)
getch();
return;
int flag=0;
if(st.retrollno()==n)
st.showdata();
flag=1;
}
inFile.close();
if(flag==0)
getch();
//***************************************************************
//****************************************************************
void modify_student(int n)
int found=0;
student st;
fstream File;
File.open("student.dat",ios::binary|ios::in|ios::out);
if(!File)
getch();
return;
if(st.retrollno()==n)
st.showdata();
st.getdata();
int pos=(-1)*sizeof(st);
File.seekp(pos,ios::cur);
found=1;
File.close();
if(found==0)
getch();
//***************************************************************
//****************************************************************
void delete_student(int n)
student st;
ifstream inFile;
inFile.open("student.dat",ios::binary);
if(!inFile)
getch();
return;
ofstream outFile;
outFile.open("Temp.dat",ios::out);
inFile.seekg(0,ios::beg);
if(st.retrollno()!=n)
}
outFile.close();
inFile.close();
remove("student.dat");
rename("Temp.dat","student.dat");
getch();
//***************************************************************
//****************************************************************
void class_result()
student st;
ifstream inFile;
inFile.open("student.dat",ios::binary);
if(!inFile)
getch();
return 0;}
cout<<"==========================================================\n";
cout<<"==========================================================\n";
{ st.show_tabular(); }
getch();
inFile.close();}
//***************************************************************
void result()
{ char ch;
int rno;
cout<<"\n\n\n\tRESULT MENU";
cin>>ch;
clrscr();
switch(ch)
display_sp(rno); break;
default: cout<<"\a";
}}
//***************************************************************
// INTRODUCTION FUNCTION
//****************************************************************
void intro()
cout<<"\n\n\n\t\t STUDENT";
cout<<"\n\n\t\tREPORT CARD";
cout<<"\n\n\t\t PROJECT";
getch(); }
//***************************************************************
void entry_menu()
char ch;
int num;
clrscr();
cout<<"\n\n\n\tENTRY MENU";
cin>>ch;
clrscr();
switch(ch)
display_sp(num); break;
modify_student(num);break;
delete_student(num);break;
//***************************************************************
// END OF PROJECT
//***************************************************************