A Computer Project 12 A
A Computer Project 12 A
Card Generator
(Computer Project)
Made By:
Aniruddha Das
Roll No. : 41
Class: XII-A
Session: 2019-20
Submitted to:
Mrs. Alpa Biju
This is to certify that the “Student Report card Maker” is made by: ……………………………….
Roll No: ………………………………………..
Under my supervision and Guidance.
This is their authentic work for the fulfillment of computer project work under C.B.S.E. computer
Practical Examination for the session 2019-20.
This is the right time to express my gratitude towards my teachers/ mentor for their constant support
and guidance. These are only few words which we have written here to show our respect to our
teachers.
Though they will not among us after this session but their lesson will always guide us in future also.
This project is mine, but it is their inspiration and constant push that we are now able to compile the
whole knowledge we learnt through out 11 & 12, in the form of this project.
Yours Sincerely
[Aniruddha Das]
Index
Student report card maker is a simple computer program designed to help teachers to generate
student’s report card after every session.
The whole program is designed in this way that you can expand it up to any level. Initially it is used to
feed students information and marks obtained in five subjects.
This information is recorded in a binary file “report.dat”, so that this recorded information can be used
later on at any stage.
Modification, deletion and searching, reporting facility are given in this project for easy management.
Data Required as Input
>=95 A+
<95 and >=90 A
<90 and >=80 B+
<80 and >=70 B
<70 and >=60 C+
<60 C
Classes & Their Function
class report {
private:
int phy,chem,math,comp,eng,total,admno,std;
char name[30], fname[30], section, grade[3];
public :
void main_menu(); //function to display main menu
void search_menu(); // function to display search menu
void report_menu( ); // function to display report menu
void read_data( ); // function to read all the data members from the
//keyboard
void calculate(); // function to calculate total marks, per and grade
Hardware required:
64 MB RAM
Pentium-1 Processor and Above
Mouse
Keyboard
Software requirement:
Operating System – Windows or any other supported
C++ Compiler
IDE ( Integrated Development Environment )
Code
#include<iostream.h>
#include<fstream.h>
#include<conio.h>
#include<string.h>
#include<stdio.h>
class report {
private :
int phy,chem,math,comp,eng,total,admno,std;
char name[30],fname[30],section,grade[3];
float per;
public :
void main_menu(); //function to display main menu
void search_menu(); // function to display search menu
void report_menu( ); // function to display report menu
void read_data( ); // function to read all the data members from the
//keyboard
void calculate(); // function to calculate total marks, per and grade
return;
}
default :
cout<<"\n Wrong Choice.... Try again";
}
}while(choice!=3);
return;
}
return;
}
void report::calculate()
{
total = phy+chem+math+comp+eng;
per = total/5.0;
if(per>=95)
strcpy(grade,"A+");
void report::disp_data()
{
return ;
}
void report::search_name( )
{
ifstream fin;
fin.open("report.dat");
char tname[30];
int flag=0;
clrscr();
cout<<"\n Enter Name to search :";
gets(tname);
while(fin.read((char*)this,sizeof(report)))
{
if(strcmpi(tname,name)==0)
{
clrscr();
cout<<"\n Student Information ";
cout<<"\n--------------------------------------------------------"<<endl;
disp_data();
flag=1;
}
}
fin.close();
if(flag==0)
cout<<"Student "<<tname<<" does not exist in the database.... Try again";
return;
}
clrscr();
cout<<"\n Enter Admission Number to search : ";
cin>>tadmno;
while(fin.read((char*)this,sizeof(report)))
{
if(tadmno == admno)
{
clrscr();
cout<<"\n Student Information ";
cout<<"\n--------------------------------------------------------"<<endl;
disp_data();
flag=1;
}
}
fin.close();
if(flag==0)
cout<<"\n\n Admission No : "<<tadmno <<" does not exist.... Try again";
return;
void report::single_report_card()
{
clrscr();
return;
}
clrscr();
cout<<"\n Enter admission No : ";
cin>>tadmno;
int tstd;
char tsect;
int row =6;
int no =0;
ifstream fin;
fin.open("report.dat");
clrscr();
cout<<"n\n Enter Class (1..12) :";
cin>>tstd;
cout<<"\n Enter section :";
cin>>tsect;
clrscr();
cout<<"\n\t\t Delhi Public School,Bopal ";
cout<<"\n\t\t Class :"<<tstd<<"-"<<tsect<<"\t\t Session : 2019-20"<<endl;
cout<<"-------------------------------------------------------------------------------"<<endl;
cout<<"Admno\tName\tFname\t Phy \t Chem\t Math \t Comp \t Eng \t Total \t per\n";
cout<<"-------------------------------------------------------------------------------"<<endl;
while(fin.read((char*)this, sizeof(report)))
{
if(tstd==std && tsect== section )
{
row= row+1;
no++;
if(row>=30)
{
cout<<"\n\n Press any key to continue ................";
getch();
cout<<"\n\t\t Delhi Public School,Bopal ";
cout<<"\n\t\t Class :"<<tstd<<"-"<<tsect<<"\t\t Session : 2019-20"<<endl;
cout<<"-------------------------------------------------------------------------------"<<endl;
cout<<"Admno\tName\tFname\t Phy \t Chem\t Math \t Comp \t Eng \t Total \t per\n";
cout<<"-------------------------------------------------------------------------------"<<endl;
row =6;
}
cout<<admno<<"\t"<<name<<"\t"<<fname<<"\t"<<phy<<"\t"<<chem<<"\t"<<math<<"\t"<<comp<<"\t"<
<eng<<"\t"<<total<<"\t"<<per<<endl;
}
}
fin.close();
cout<<"-------------------------------------------------------------------------------"<<endl;
cout<<"\n Total Student : "<<no<<" Report prepared By :"<<"Aniruddha Das";
getch();
return ;
void report::del_record ()
{
ifstream fin;
ofstream fout;
int tadmno;
int flag =0;
clrscr();
cout<<"\n Enter admno to delete :";
cin>>tadmno;
fin.open("report.dat",ios::binary);
fout.open("temp.dat");
while(fin.read((char*)this, sizeof(report)))
{
if(tadmno!=admno)
fout.write((char*)this,sizeof(report));
else
flag=1;
}
fin.close();
fout.close();
if(flag==1)
cout<<"\n\n Record Sucessfully removed ";
else
cout<<"\n Admission No :"<<tadmno <<" does not exist...Try again";
getch();
return;
}
ifstream fin;
ofstream fout;
int tadmno;
int flag =0;
clrscr();
cout<<"\n Enter Admno to Modify :";
cin>>tadmno;
fin.open("report.dat",ios::binary);
fout.open("temp.dat");
while(fin.read((char*)this, sizeof(report)))
{
if(tadmno == admno)
{ read_data(); calculate(); flag=1; }
fout.write((char*)this,sizeof(report));
}
fin.close();
fout.close();
if(flag==1)
cout<<"\n\n Record Sucessfully modified ";
else
cout<<"\n Admission No :"<<tadmno <<" does not exist...Try again";
getch();
return;
}
/*-----------main function to implement report class ------------*/
int main(){
report r;
r.main_menu();
return 0;
}
Screenshots
Reference
1. Computer projects
1. By Mrs. Alpa Biju
2. Computer science
1. By Sumita Arora
3. Online reference
1. www.pscode.com
2. www.programmersheaven.com