SlideShare a Scribd company logo
ON
STUDENTREPORTCARD
Madeby SonaliSinha,12-A
KENDRIYA VIDYALAYAPRAGATIvihar
This program is very useful in real life situation for
providing instant information to a school or college
about a student performance throughout the year by
creating a report card.
In this c++ program we can modify, add, delete, recall
and list the records.
Being OOP concept available, we can add or remove
function anytime we need and even add classes and
derived classes for further improvement of the program
without recording.
This is to certify that SONALI SINHA of class XII has
successfully completed this computer project on the
topic “STUDENT REPORTCARD” under the guidance of
Mrs. SHWETA ROHILLA, during academic session 2015-
2016 as per the guidelines issues by Central Board of
Secondary Education.
Teacher Signature
I am extremely grateful to Mrs. Shweta Rohilla,
PGT Computer Science for his able guidance and
useful suggestions, which helped me in completing
the project work, in time.
I would also like to thank all the teaching and non-
teaching staff of Computer Science department
who helped me directly or indirectly in the
completion of this project.
Finally, yet importantly, I would like to express my
heartfelt thanks to my beloved parents for their
blessings, my friends/classmates for their help and
wishes for the successful completion of this
project.
SONALI SINHA
12-A
HEADER FILE USED
1. Fstream .h
2. Iomanip.h
3. Stdio.h
4. Conio.h
Source Code
#include<fstream.h>
#include<iomanip.h>
#include<stdio.h>
#include<conio.h>
class student
{
int rollno;
char name[50];
int p_marks, c_marks, m_marks, e_marks, cs_marks;
float per;
char grade;
void calculate(); //functionto calculate grade
public:
void getdata(); //functionto accept data from user
void showdata(); //function to showdata onscreen
void show_tabular();
int retrollno();
}; //class ends here
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()
{
cout<<"nEnter The rollnumber ofstudent ";
cin>>rollno;
cout<<"nnEnter The Name of student ";
gets(name);
cout<<"nEnter The marks inphysics out of 100 :";
cin>>p_marks;
cout<<"nEnter The marks inchemistryout of 100 :";
cin>>c_marks;
cout<<"nEnter The marks inmaths out of 100 :";
cin>>m_marks;
cout<<"nEnter The marks inenglishout of 100 :";
cin>>e_marks;
cout<<"nEnter The marks incomputer science out of 100 :";
cin>>cs_marks;
calculate();
}
void student::showdata()
{
cout<<"nRoll number of student :"<<rollno;
cout<<"nName ofstudent :"<<name;
cout<<"nMarks in Physics :"<<p_marks;
cout<<"nMarks in Chemistry:"<<c_marks;
cout<<"nMarks in Maths :"<<m_marks;
cout<<"nMarks in English :"<<e_marks;
cout<<"nMarks in Computer Science :"<<cs_marks;
cout<<"nPercentage ofstudent is :"<<per;
cout<<"nGrade of student is :"<<grade;
}
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<<setw(4)<<cs_marks<<setw(6)<<per<<setw(6)<<" "<<grade<<endl;
}
int student::retrollno()
{
return rollno;
}
//***************************************************************
// function declaration
//****************************************************************
void write_student(); //write the record inbinaryfile
void display_all(); //readallrecords frombinaryfile
void display_sp(int); //accept rollnoandreadrecord frombinaryfile
void modify_student(int); //accept rollnoandupdate recordof binaryfile
void delete_student(int); //accept rollnoanddelete selectedrecords frombinaryfile
void class_result(); //displayallrecords in tabular format from binaryfile
void result(); //displayresult menu
void intro(); //displaywelcome screen
void entry_menu();//displayentrymenuonscreen
//***************************************************************
// THE MAIN FUNCTION OF PROGRAM
//****************************************************************
int main()
{
char ch;
cout.setf(ios::fixed|ios::showpoint);
cout<<setprecision(2);// program outputs decimal number to two decimal places
clrscr();
intro();
do
{
clrscr();
cout<<"nnntMAIN MENU";
cout<<"nnt01. RESULTMENU";
cout<<"nnt02. ENTRY/EDIT MENU";
cout<<"nnt03. EXIT";
cout<<"nntPlease Select Your Option(1-3) ";
cin>>ch;
clrscr();
switch(ch)
{
case '1':result();
break;
case '2':entry_menu();
break;
case '3':
break;
default :cout<<"a";
}
}while(ch!='3');
return 0;
}
//***************************************************************
// function to write infile
//****************************************************************
void write_student()
{
student st;
ofstreamoutFile;
outFile.open("student.dat",ios::binary|ios::app);
st.getdata();
outFile.write((char *) &st, sizeof(student));
outFile.close();
cout<<"nnStudent record HasBeen Created";
cin.ignore();
getch();
}
//***************************************************************
// function to read all records from file
//****************************************************************
void display_all()
{
student st;
ifstream inFile;
inFile.open("student.dat",ios::binary);
if(!inFile)
{
cout<<"File couldnot be open!! Press anyKey...";
getch();
return;
}
cout<<"nnnttDISPLAY ALL RECORD !!!nn";
while(inFile.read((char *) &st, sizeof(student)))
{
st.showdata();
cout<<"nn====================================n";
}
inFile.close();
getch();
}
//***************************************************************
// function to read specific record from file
//****************************************************************
void display_sp(int n)
{
student st;
ifstream inFile;
inFile.open("student.dat",ios::binary);
if(!inFile)
{
cout<<"File couldnot be open!! Press anyKey...";
getch();
return;
}
int flag=0;
while(inFile.read((char *) &st, sizeof(student)))
{
if(st.retrollno()==n)
{
st.showdata();
flag=1;
}
}
inFile.close();
if(flag==0)
cout<<"nnrecordnot exist";
getch();
}
//***************************************************************
// function to modifyrecordof file
//****************************************************************
void modify_student(int n)
{
int found=0;
student st;
fstream File;
File.open("student.dat",ios::binary|ios::in|ios::out);
if(!File)
{
cout<<"File couldnot be open!! Press anyKey...";
getch();
return;
}
while(File.read((char *) &st, sizeof(student))&& found==0)
{
if(st.retrollno()==n)
{
st.showdata();
cout<<"nnPlease Enter The New Details ofstudent"<<endl;
st.getdata();
int pos=(-1)*sizeof(st);
File.seekp(pos,ios::cur);
File.write((char *) &st, sizeof(student));
cout<<"nnt RecordUpdated";
found=1;
}
}
File.close();
if(found==0)
cout<<"nnRecord Not Found";
getch();
}
//***************************************************************
// function to delete recordof file
//****************************************************************
void delete_student(int n)
{
student st;
ifstream inFile;
inFile.open("student.dat",ios::binary);
if(!inFile)
{
cout<<"File couldnot be open!! Press anyKey...";
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)
{
outFile.write((char *) &st, sizeof(student));
}
}
outFile.close();
inFile.close();
remove("student.dat");
rename("Temp.dat","student.dat");
cout<<"nntRecordDeleted ..";
getch();
}
//***************************************************************
// function to displayall students grade report
//****************************************************************
void class_result()
{
student st;
ifstream inFile;
inFile.open("student.dat",ios::binary);
if(!inFile)
{
cout<<"File couldnot be open!! Press any Key...";
getch();
return;
}
cout<<"nnttALL STUDENTS RESULT 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();
}
//***************************************************************
// function to displayresult menu
//****************************************************************
void result()
{
char ch;
int rno;
cout<<"nnntRESULT MENU";
cout<<"nnnt1. Class Result";
cout<<"nnt2. Student Report Card";
cout<<"nnt3. Back to Main Menu";
cout<<"nnntEnter Choice (1/2/3)? ";
cin>>ch;
clrscr();
switch(ch)
{
case '1' :class_result();break;
case '2' :cout<<"nntEnter Roll Number Of Student :";
cin>>rno;
display_sp(rno);break;
case '3' :break;
default :cout<<"a";
}
}
//***************************************************************
// INTRODUCTION FUNCTION
//****************************************************************
void intro()
{
cout<<"nnntt STUDENT";
cout<<"nnttREPORT CARD";
cout<<"nntt PROJECT";
cout<<"nnntMADEBY :SONALI SINHA";
cout<<"ntSCHOOL :KENDRIYA VIDYALAYA PRAGATI VIHAR";
getch();
}
//***************************************************************
// ENTRY / EDIT MENU FUNCTION
//****************************************************************
void entry_menu()
{
char ch;
int num;
clrscr();
cout<<"nnntENTRY MENU";
cout<<"nnt1.CREATE STUDENT RECORD";
cout<<"nnt2.DISPLAY ALL STUDENTSRECORDS";
cout<<"nnt3.SEARCH STUDENT RECORD ";
cout<<"nnt4.MODIFY STUDENT RECORD";
cout<<"nnt5.DELETE STUDENT RECORD";
cout<<"nnt6.BACKTO MAIN MENU";
cout<<"nntPlease Enter Your Choice (1-6) ";
cin>>ch;
clrscr();
switch(ch)
{
case '1': write_student();break;
case '2': display_all();break;
case '3': cout<<"nntPlease Enter The roll number ";cin>>num;
display_sp(num);break;
case '4': cout<<"nntPlease Enter The roll number ";cin>>num;
modify_student(num);break;
case '5': cout<<"nntPlease Enter The roll number ";cin>>num;
delete_student(num);break;
case '6': break;
default: cout<<"a";entry_menu();
}
}
//***************************************************************
// END OF PROJECT
//*****************************************
OUTPUTOF THE PROGRAMAS EXECUTED
OPTION 1: RESULT MENU
CHOICE 1
CHOICE 2
OPTION2:ENTRY/EDIT MENU
OPTION 3: EXIT
BIBLIOGRAPHY
1. COMPUTER SCIENCE WITH C++ , SUMITA ARORA
2. PROJECTYAPA.COM
3. LET US C ++, YASHAVANTKANETKAR
Investigatory Project for Computer Science

More Related Content

What's hot

cbse 12 computer science investigatory project
cbse 12 computer science investigatory project  cbse 12 computer science investigatory project
cbse 12 computer science investigatory project
D. j Vicky
 
c++ program for Railway reservation
c++ program for Railway reservationc++ program for Railway reservation
c++ program for Railway reservation
Swarup Kumar Boro
 
12th CBSE Computer Science Project
12th CBSE Computer Science Project12th CBSE Computer Science Project
12th CBSE Computer Science Project
Ashwin Francis
 
programming in C++ report
programming in C++ reportprogramming in C++ report
programming in C++ report
vikram mahendra
 
systems programming lab programs in c
systems programming lab programs in csystems programming lab programs in c
systems programming lab programs in c
Meghna Roy
 
Telephone billing system in c++
Telephone billing system in c++Telephone billing system in c++
Telephone billing system in c++
vikram mahendra
 
CBSE Computer Project for Class 12 ( C++)
CBSE Computer Project for Class 12 ( C++)CBSE Computer Project for Class 12 ( C++)
CBSE Computer Project for Class 12 ( C++)
Karan Bora
 
81818088 isc-class-xii-computer-science-project-java-programs
81818088 isc-class-xii-computer-science-project-java-programs81818088 isc-class-xii-computer-science-project-java-programs
81818088 isc-class-xii-computer-science-project-java-programs
Abhishek Jena
 
Durgesh
DurgeshDurgesh
Durgesh
dkbossverma
 
C++ file
C++ fileC++ file
C++ file
Mukund Trivedi
 
Ip project
Ip projectIp project
Ip project
Jasmeet Singh
 
BANK MANAGEMENT INVESTIGATORY PROJECT CLASS 12TH
BANK MANAGEMENT INVESTIGATORY PROJECT CLASS 12THBANK MANAGEMENT INVESTIGATORY PROJECT CLASS 12TH
BANK MANAGEMENT INVESTIGATORY PROJECT CLASS 12TH
SHAJUS5
 
Opps manual final copy
Opps manual final   copyOpps manual final   copy
Opps manual final copy
moorthy muppidathi
 
Pattern printing-in-c(Jaydip Kikani)
Pattern printing-in-c(Jaydip Kikani)Pattern printing-in-c(Jaydip Kikani)
Pattern printing-in-c(Jaydip Kikani)
Jaydip JK
 
C++ COMPUTER SCIENCE PROJECT
C++ COMPUTER SCIENCE PROJECTC++ COMPUTER SCIENCE PROJECT
C++ COMPUTER SCIENCE PROJECT
Abhishek Shukla
 
Design problem
Design problemDesign problem
Design problem
Sanjay Kumar Chakravarti
 
Any number system to any number system convertor
Any number system to any number system convertorAny number system to any number system convertor
Any number system to any number system convertor
patelsandip5682
 
Informatics Practices/ Information Practices Project (IP Project Class 12)
Informatics Practices/ Information Practices Project (IP Project Class 12)Informatics Practices/ Information Practices Project (IP Project Class 12)
Informatics Practices/ Information Practices Project (IP Project Class 12)
KushShah65
 
C++ programs
C++ programsC++ programs
C++ programs
Mukund Gandrakota
 

What's hot (19)

cbse 12 computer science investigatory project
cbse 12 computer science investigatory project  cbse 12 computer science investigatory project
cbse 12 computer science investigatory project
 
c++ program for Railway reservation
c++ program for Railway reservationc++ program for Railway reservation
c++ program for Railway reservation
 
12th CBSE Computer Science Project
12th CBSE Computer Science Project12th CBSE Computer Science Project
12th CBSE Computer Science Project
 
programming in C++ report
programming in C++ reportprogramming in C++ report
programming in C++ report
 
systems programming lab programs in c
systems programming lab programs in csystems programming lab programs in c
systems programming lab programs in c
 
Telephone billing system in c++
Telephone billing system in c++Telephone billing system in c++
Telephone billing system in c++
 
CBSE Computer Project for Class 12 ( C++)
CBSE Computer Project for Class 12 ( C++)CBSE Computer Project for Class 12 ( C++)
CBSE Computer Project for Class 12 ( C++)
 
81818088 isc-class-xii-computer-science-project-java-programs
81818088 isc-class-xii-computer-science-project-java-programs81818088 isc-class-xii-computer-science-project-java-programs
81818088 isc-class-xii-computer-science-project-java-programs
 
Durgesh
DurgeshDurgesh
Durgesh
 
C++ file
C++ fileC++ file
C++ file
 
Ip project
Ip projectIp project
Ip project
 
BANK MANAGEMENT INVESTIGATORY PROJECT CLASS 12TH
BANK MANAGEMENT INVESTIGATORY PROJECT CLASS 12THBANK MANAGEMENT INVESTIGATORY PROJECT CLASS 12TH
BANK MANAGEMENT INVESTIGATORY PROJECT CLASS 12TH
 
Opps manual final copy
Opps manual final   copyOpps manual final   copy
Opps manual final copy
 
Pattern printing-in-c(Jaydip Kikani)
Pattern printing-in-c(Jaydip Kikani)Pattern printing-in-c(Jaydip Kikani)
Pattern printing-in-c(Jaydip Kikani)
 
C++ COMPUTER SCIENCE PROJECT
C++ COMPUTER SCIENCE PROJECTC++ COMPUTER SCIENCE PROJECT
C++ COMPUTER SCIENCE PROJECT
 
Design problem
Design problemDesign problem
Design problem
 
Any number system to any number system convertor
Any number system to any number system convertorAny number system to any number system convertor
Any number system to any number system convertor
 
Informatics Practices/ Information Practices Project (IP Project Class 12)
Informatics Practices/ Information Practices Project (IP Project Class 12)Informatics Practices/ Information Practices Project (IP Project Class 12)
Informatics Practices/ Information Practices Project (IP Project Class 12)
 
C++ programs
C++ programsC++ programs
C++ programs
 

Viewers also liked

Paper n pulp industries
Paper n pulp industries Paper n pulp industries
Paper n pulp industries
Abhijna Shivapuram
 
Pulp & paper industries.....
Pulp & paper industries.....Pulp & paper industries.....
Pulp & paper industries.....
jitendra kumar
 
Food in india
Food in indiaFood in india
Food in india
Karto home
 
India's pulp-paper industry
India's pulp-paper industryIndia's pulp-paper industry
India's pulp-paper industry
National Institute of Technology-Trichy
 
Indian Paper Industry
Indian Paper IndustryIndian Paper Industry
Indian Paper Industry
Jaspal Singh
 
Indian Processed Food Industry Analysis
Indian Processed Food Industry AnalysisIndian Processed Food Industry Analysis
Indian Processed Food Industry Analysis
Nikhil Saraf
 
Pulp and Paper industry
Pulp and Paper industryPulp and Paper industry
Pulp and Paper industry
Arun Sarasan
 
Investigatory Project
Investigatory ProjectInvestigatory Project
Investigatory Project
Russen Charlotte
 
Food Processing Industry India
Food Processing Industry IndiaFood Processing Industry India
Food Processing Industry India
Ankit Agarwal
 
Plain how toplan-reportcard2014final-acrolinxembedded
Plain how toplan-reportcard2014final-acrolinxembeddedPlain how toplan-reportcard2014final-acrolinxembedded
Plain how toplan-reportcard2014final-acrolinxembedded
Center for Plain Language
 
Organic food industry in India
Organic food industry in IndiaOrganic food industry in India
Organic food industry in India
Chandresh Dedhia
 
Student management system
Student management systemStudent management system
Student management system
Gaurav Subham
 
Landslide ppt
Landslide pptLandslide ppt
Landslide ppt
mechanical Singh
 

Viewers also liked (13)

Paper n pulp industries
Paper n pulp industries Paper n pulp industries
Paper n pulp industries
 
Pulp & paper industries.....
Pulp & paper industries.....Pulp & paper industries.....
Pulp & paper industries.....
 
Food in india
Food in indiaFood in india
Food in india
 
India's pulp-paper industry
India's pulp-paper industryIndia's pulp-paper industry
India's pulp-paper industry
 
Indian Paper Industry
Indian Paper IndustryIndian Paper Industry
Indian Paper Industry
 
Indian Processed Food Industry Analysis
Indian Processed Food Industry AnalysisIndian Processed Food Industry Analysis
Indian Processed Food Industry Analysis
 
Pulp and Paper industry
Pulp and Paper industryPulp and Paper industry
Pulp and Paper industry
 
Investigatory Project
Investigatory ProjectInvestigatory Project
Investigatory Project
 
Food Processing Industry India
Food Processing Industry IndiaFood Processing Industry India
Food Processing Industry India
 
Plain how toplan-reportcard2014final-acrolinxembedded
Plain how toplan-reportcard2014final-acrolinxembeddedPlain how toplan-reportcard2014final-acrolinxembedded
Plain how toplan-reportcard2014final-acrolinxembedded
 
Organic food industry in India
Organic food industry in IndiaOrganic food industry in India
Organic food industry in India
 
Student management system
Student management systemStudent management system
Student management system
 
Landslide ppt
Landslide pptLandslide ppt
Landslide ppt
 

Similar to Investigatory Project for Computer Science

Sunil
SunilSunil
computer shop
computer shopcomputer shop
computer shop
saurabhswaraj
 
Student DATABASE MANAGeMEnT SysTEm
Student DATABASE MANAGeMEnT SysTEmStudent DATABASE MANAGeMEnT SysTEm
Student DATABASE MANAGeMEnT SysTEm
home
 
Bhanu Pratap Singh Shekhawat, BCA Third Year
Bhanu Pratap Singh Shekhawat, BCA Third YearBhanu Pratap Singh Shekhawat, BCA Third Year
Bhanu Pratap Singh Shekhawat, BCA Third Year
Dezyneecole
 
CS Project-Source code for shopping inventory for CBSE 12th
CS Project-Source code for shopping inventory for CBSE 12thCS Project-Source code for shopping inventory for CBSE 12th
CS Project-Source code for shopping inventory for CBSE 12th
Sudhindra Mudhol
 
Computerscience 12th
Computerscience 12thComputerscience 12th
Computerscience 12th
JUSTJOINUS
 
CCE management system
CCE management systemCCE management system
CCE management system
Trish004
 
How to write you first class in c++ object oriented programming
How to write you first class in c++ object oriented programmingHow to write you first class in c++ object oriented programming
How to write you first class in c++ object oriented programming
Syed Faizan Hassan
 
Program: Inheritance in Class - to find topper out of 10 students
Program: Inheritance in Class - to find topper out of 10 studentsProgram: Inheritance in Class - to find topper out of 10 students
Program: Inheritance in Class - to find topper out of 10 students
Swarup Boro
 
Reshma Kodwani , BCA Third Year
Reshma Kodwani , BCA Third YearReshma Kodwani , BCA Third Year
Reshma Kodwani , BCA Third Year
dezyneecole
 
Kirti Kumawat, BCA Third Year
Kirti Kumawat, BCA Third YearKirti Kumawat, BCA Third Year
Kirti Kumawat, BCA Third Year
dezyneecole
 
@author public class Person{   String sname, .pdf
  @author   public class Person{   String sname, .pdf  @author   public class Person{   String sname, .pdf
@author public class Person{   String sname, .pdf
aplolomedicalstoremr
 
classes & objects.ppt
classes & objects.pptclasses & objects.ppt
classes & objects.ppt
BArulmozhi
 
Library Management Project (computer science) class 12
Library Management Project (computer science) class 12Library Management Project (computer science) class 12
Library Management Project (computer science) class 12
RithuJ
 
project report in C++ programming and SQL
project report in C++ programming and SQLproject report in C++ programming and SQL
project report in C++ programming and SQL
vikram mahendra
 
inheritance c++
inheritance c++inheritance c++
inheritance c++
Muraleedhar Sundararajan
 
computer science project
computer science projectcomputer science project
computer science project
Roshan Bastia
 
aprojectreportonlibraymgtsystem2-141114055422-conversion-gate02 (1).pdf
aprojectreportonlibraymgtsystem2-141114055422-conversion-gate02 (1).pdfaprojectreportonlibraymgtsystem2-141114055422-conversion-gate02 (1).pdf
aprojectreportonlibraymgtsystem2-141114055422-conversion-gate02 (1).pdf
MahdeepBisht
 
L10
L10L10
L10
lksoo
 
Object Oriented Programming using C++: Ch11 Virtual Functions.pptx
Object Oriented Programming using C++: Ch11 Virtual Functions.pptxObject Oriented Programming using C++: Ch11 Virtual Functions.pptx
Object Oriented Programming using C++: Ch11 Virtual Functions.pptx
RashidFaridChishti
 

Similar to Investigatory Project for Computer Science (20)

Sunil
SunilSunil
Sunil
 
computer shop
computer shopcomputer shop
computer shop
 
Student DATABASE MANAGeMEnT SysTEm
Student DATABASE MANAGeMEnT SysTEmStudent DATABASE MANAGeMEnT SysTEm
Student DATABASE MANAGeMEnT SysTEm
 
Bhanu Pratap Singh Shekhawat, BCA Third Year
Bhanu Pratap Singh Shekhawat, BCA Third YearBhanu Pratap Singh Shekhawat, BCA Third Year
Bhanu Pratap Singh Shekhawat, BCA Third Year
 
CS Project-Source code for shopping inventory for CBSE 12th
CS Project-Source code for shopping inventory for CBSE 12thCS Project-Source code for shopping inventory for CBSE 12th
CS Project-Source code for shopping inventory for CBSE 12th
 
Computerscience 12th
Computerscience 12thComputerscience 12th
Computerscience 12th
 
CCE management system
CCE management systemCCE management system
CCE management system
 
How to write you first class in c++ object oriented programming
How to write you first class in c++ object oriented programmingHow to write you first class in c++ object oriented programming
How to write you first class in c++ object oriented programming
 
Program: Inheritance in Class - to find topper out of 10 students
Program: Inheritance in Class - to find topper out of 10 studentsProgram: Inheritance in Class - to find topper out of 10 students
Program: Inheritance in Class - to find topper out of 10 students
 
Reshma Kodwani , BCA Third Year
Reshma Kodwani , BCA Third YearReshma Kodwani , BCA Third Year
Reshma Kodwani , BCA Third Year
 
Kirti Kumawat, BCA Third Year
Kirti Kumawat, BCA Third YearKirti Kumawat, BCA Third Year
Kirti Kumawat, BCA Third Year
 
@author public class Person{   String sname, .pdf
  @author   public class Person{   String sname, .pdf  @author   public class Person{   String sname, .pdf
@author public class Person{   String sname, .pdf
 
classes & objects.ppt
classes & objects.pptclasses & objects.ppt
classes & objects.ppt
 
Library Management Project (computer science) class 12
Library Management Project (computer science) class 12Library Management Project (computer science) class 12
Library Management Project (computer science) class 12
 
project report in C++ programming and SQL
project report in C++ programming and SQLproject report in C++ programming and SQL
project report in C++ programming and SQL
 
inheritance c++
inheritance c++inheritance c++
inheritance c++
 
computer science project
computer science projectcomputer science project
computer science project
 
aprojectreportonlibraymgtsystem2-141114055422-conversion-gate02 (1).pdf
aprojectreportonlibraymgtsystem2-141114055422-conversion-gate02 (1).pdfaprojectreportonlibraymgtsystem2-141114055422-conversion-gate02 (1).pdf
aprojectreportonlibraymgtsystem2-141114055422-conversion-gate02 (1).pdf
 
L10
L10L10
L10
 
Object Oriented Programming using C++: Ch11 Virtual Functions.pptx
Object Oriented Programming using C++: Ch11 Virtual Functions.pptxObject Oriented Programming using C++: Ch11 Virtual Functions.pptx
Object Oriented Programming using C++: Ch11 Virtual Functions.pptx
 

Recently uploaded

Walmart Business+ and Spark Good for Nonprofits.pdf
Walmart Business+ and Spark Good for Nonprofits.pdfWalmart Business+ and Spark Good for Nonprofits.pdf
Walmart Business+ and Spark Good for Nonprofits.pdf
TechSoup
 
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptxBeyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
EduSkills OECD
 
math operations ued in python and all used
math operations ued in python and all usedmath operations ued in python and all used
math operations ued in python and all used
ssuser13ffe4
 
Nutrition Inc FY 2024, 4 - Hour Training
Nutrition Inc FY 2024, 4 - Hour TrainingNutrition Inc FY 2024, 4 - Hour Training
Nutrition Inc FY 2024, 4 - Hour Training
melliereed
 
UGC NET Exam Paper 1- Unit 1:Teaching Aptitude
UGC NET Exam Paper 1- Unit 1:Teaching AptitudeUGC NET Exam Paper 1- Unit 1:Teaching Aptitude
UGC NET Exam Paper 1- Unit 1:Teaching Aptitude
S. Raj Kumar
 
Level 3 NCEA - NZ: A Nation In the Making 1872 - 1900 SML.ppt
Level 3 NCEA - NZ: A  Nation In the Making 1872 - 1900 SML.pptLevel 3 NCEA - NZ: A  Nation In the Making 1872 - 1900 SML.ppt
Level 3 NCEA - NZ: A Nation In the Making 1872 - 1900 SML.ppt
Henry Hollis
 
Bonku-Babus-Friend by Sathyajith Ray (9)
Bonku-Babus-Friend by Sathyajith Ray  (9)Bonku-Babus-Friend by Sathyajith Ray  (9)
Bonku-Babus-Friend by Sathyajith Ray (9)
nitinpv4ai
 
Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...
Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...
Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...
imrankhan141184
 
Jemison, MacLaughlin, and Majumder "Broadening Pathways for Editors and Authors"
Jemison, MacLaughlin, and Majumder "Broadening Pathways for Editors and Authors"Jemison, MacLaughlin, and Majumder "Broadening Pathways for Editors and Authors"
Jemison, MacLaughlin, and Majumder "Broadening Pathways for Editors and Authors"
National Information Standards Organization (NISO)
 
How to Setup Warehouse & Location in Odoo 17 Inventory
How to Setup Warehouse & Location in Odoo 17 InventoryHow to Setup Warehouse & Location in Odoo 17 Inventory
How to Setup Warehouse & Location in Odoo 17 Inventory
Celine George
 
Benner "Expanding Pathways to Publishing Careers"
Benner "Expanding Pathways to Publishing Careers"Benner "Expanding Pathways to Publishing Careers"
Benner "Expanding Pathways to Publishing Careers"
National Information Standards Organization (NISO)
 
BIOLOGY NATIONAL EXAMINATION COUNCIL (NECO) 2024 PRACTICAL MANUAL.pptx
BIOLOGY NATIONAL EXAMINATION COUNCIL (NECO) 2024 PRACTICAL MANUAL.pptxBIOLOGY NATIONAL EXAMINATION COUNCIL (NECO) 2024 PRACTICAL MANUAL.pptx
BIOLOGY NATIONAL EXAMINATION COUNCIL (NECO) 2024 PRACTICAL MANUAL.pptx
RidwanHassanYusuf
 
Standardized tool for Intelligence test.
Standardized tool for Intelligence test.Standardized tool for Intelligence test.
Standardized tool for Intelligence test.
deepaannamalai16
 
A Visual Guide to 1 Samuel | A Tale of Two Hearts
A Visual Guide to 1 Samuel | A Tale of Two HeartsA Visual Guide to 1 Samuel | A Tale of Two Hearts
A Visual Guide to 1 Samuel | A Tale of Two Hearts
Steve Thomason
 
Film vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movieFilm vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movie
Nicholas Montgomery
 
HYPERTENSION - SLIDE SHARE PRESENTATION.
HYPERTENSION - SLIDE SHARE PRESENTATION.HYPERTENSION - SLIDE SHARE PRESENTATION.
HYPERTENSION - SLIDE SHARE PRESENTATION.
deepaannamalai16
 
BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...
BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...
BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...
Nguyen Thanh Tu Collection
 
Leveraging Generative AI to Drive Nonprofit Innovation
Leveraging Generative AI to Drive Nonprofit InnovationLeveraging Generative AI to Drive Nonprofit Innovation
Leveraging Generative AI to Drive Nonprofit Innovation
TechSoup
 
REASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdf
REASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdfREASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdf
REASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdf
giancarloi8888
 
BBR 2024 Summer Sessions Interview Training
BBR  2024 Summer Sessions Interview TrainingBBR  2024 Summer Sessions Interview Training
BBR 2024 Summer Sessions Interview Training
Katrina Pritchard
 

Recently uploaded (20)

Walmart Business+ and Spark Good for Nonprofits.pdf
Walmart Business+ and Spark Good for Nonprofits.pdfWalmart Business+ and Spark Good for Nonprofits.pdf
Walmart Business+ and Spark Good for Nonprofits.pdf
 
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptxBeyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
 
math operations ued in python and all used
math operations ued in python and all usedmath operations ued in python and all used
math operations ued in python and all used
 
Nutrition Inc FY 2024, 4 - Hour Training
Nutrition Inc FY 2024, 4 - Hour TrainingNutrition Inc FY 2024, 4 - Hour Training
Nutrition Inc FY 2024, 4 - Hour Training
 
UGC NET Exam Paper 1- Unit 1:Teaching Aptitude
UGC NET Exam Paper 1- Unit 1:Teaching AptitudeUGC NET Exam Paper 1- Unit 1:Teaching Aptitude
UGC NET Exam Paper 1- Unit 1:Teaching Aptitude
 
Level 3 NCEA - NZ: A Nation In the Making 1872 - 1900 SML.ppt
Level 3 NCEA - NZ: A  Nation In the Making 1872 - 1900 SML.pptLevel 3 NCEA - NZ: A  Nation In the Making 1872 - 1900 SML.ppt
Level 3 NCEA - NZ: A Nation In the Making 1872 - 1900 SML.ppt
 
Bonku-Babus-Friend by Sathyajith Ray (9)
Bonku-Babus-Friend by Sathyajith Ray  (9)Bonku-Babus-Friend by Sathyajith Ray  (9)
Bonku-Babus-Friend by Sathyajith Ray (9)
 
Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...
Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...
Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...
 
Jemison, MacLaughlin, and Majumder "Broadening Pathways for Editors and Authors"
Jemison, MacLaughlin, and Majumder "Broadening Pathways for Editors and Authors"Jemison, MacLaughlin, and Majumder "Broadening Pathways for Editors and Authors"
Jemison, MacLaughlin, and Majumder "Broadening Pathways for Editors and Authors"
 
How to Setup Warehouse & Location in Odoo 17 Inventory
How to Setup Warehouse & Location in Odoo 17 InventoryHow to Setup Warehouse & Location in Odoo 17 Inventory
How to Setup Warehouse & Location in Odoo 17 Inventory
 
Benner "Expanding Pathways to Publishing Careers"
Benner "Expanding Pathways to Publishing Careers"Benner "Expanding Pathways to Publishing Careers"
Benner "Expanding Pathways to Publishing Careers"
 
BIOLOGY NATIONAL EXAMINATION COUNCIL (NECO) 2024 PRACTICAL MANUAL.pptx
BIOLOGY NATIONAL EXAMINATION COUNCIL (NECO) 2024 PRACTICAL MANUAL.pptxBIOLOGY NATIONAL EXAMINATION COUNCIL (NECO) 2024 PRACTICAL MANUAL.pptx
BIOLOGY NATIONAL EXAMINATION COUNCIL (NECO) 2024 PRACTICAL MANUAL.pptx
 
Standardized tool for Intelligence test.
Standardized tool for Intelligence test.Standardized tool for Intelligence test.
Standardized tool for Intelligence test.
 
A Visual Guide to 1 Samuel | A Tale of Two Hearts
A Visual Guide to 1 Samuel | A Tale of Two HeartsA Visual Guide to 1 Samuel | A Tale of Two Hearts
A Visual Guide to 1 Samuel | A Tale of Two Hearts
 
Film vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movieFilm vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movie
 
HYPERTENSION - SLIDE SHARE PRESENTATION.
HYPERTENSION - SLIDE SHARE PRESENTATION.HYPERTENSION - SLIDE SHARE PRESENTATION.
HYPERTENSION - SLIDE SHARE PRESENTATION.
 
BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...
BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...
BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...
 
Leveraging Generative AI to Drive Nonprofit Innovation
Leveraging Generative AI to Drive Nonprofit InnovationLeveraging Generative AI to Drive Nonprofit Innovation
Leveraging Generative AI to Drive Nonprofit Innovation
 
REASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdf
REASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdfREASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdf
REASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdf
 
BBR 2024 Summer Sessions Interview Training
BBR  2024 Summer Sessions Interview TrainingBBR  2024 Summer Sessions Interview Training
BBR 2024 Summer Sessions Interview Training
 

Investigatory Project for Computer Science

  • 2. This program is very useful in real life situation for providing instant information to a school or college about a student performance throughout the year by creating a report card. In this c++ program we can modify, add, delete, recall and list the records. Being OOP concept available, we can add or remove function anytime we need and even add classes and derived classes for further improvement of the program without recording.
  • 3. This is to certify that SONALI SINHA of class XII has successfully completed this computer project on the topic “STUDENT REPORTCARD” under the guidance of Mrs. SHWETA ROHILLA, during academic session 2015- 2016 as per the guidelines issues by Central Board of Secondary Education. Teacher Signature
  • 4. I am extremely grateful to Mrs. Shweta Rohilla, PGT Computer Science for his able guidance and useful suggestions, which helped me in completing the project work, in time. I would also like to thank all the teaching and non- teaching staff of Computer Science department who helped me directly or indirectly in the completion of this project. Finally, yet importantly, I would like to express my heartfelt thanks to my beloved parents for their blessings, my friends/classmates for their help and wishes for the successful completion of this project. SONALI SINHA 12-A
  • 5. HEADER FILE USED 1. Fstream .h 2. Iomanip.h 3. Stdio.h 4. Conio.h
  • 6. Source Code #include<fstream.h> #include<iomanip.h> #include<stdio.h> #include<conio.h> class student { int rollno; char name[50]; int p_marks, c_marks, m_marks, e_marks, cs_marks; float per; char grade; void calculate(); //functionto calculate grade public: void getdata(); //functionto accept data from user void showdata(); //function to showdata onscreen void show_tabular();
  • 7. int retrollno(); }; //class ends here 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() { cout<<"nEnter The rollnumber ofstudent "; cin>>rollno; cout<<"nnEnter The Name of student "; gets(name); cout<<"nEnter The marks inphysics out of 100 :"; cin>>p_marks; cout<<"nEnter The marks inchemistryout of 100 :"; cin>>c_marks; cout<<"nEnter The marks inmaths out of 100 :"; cin>>m_marks;
  • 8. cout<<"nEnter The marks inenglishout of 100 :"; cin>>e_marks; cout<<"nEnter The marks incomputer science out of 100 :"; cin>>cs_marks; calculate(); } void student::showdata() { cout<<"nRoll number of student :"<<rollno; cout<<"nName ofstudent :"<<name; cout<<"nMarks in Physics :"<<p_marks; cout<<"nMarks in Chemistry:"<<c_marks; cout<<"nMarks in Maths :"<<m_marks; cout<<"nMarks in English :"<<e_marks; cout<<"nMarks in Computer Science :"<<cs_marks; cout<<"nPercentage ofstudent is :"<<per; cout<<"nGrade of student is :"<<grade; } 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<<setw(4)<<cs_marks<<setw(6)<<per<<setw(6)<<" "<<grade<<endl; } int student::retrollno() { return rollno;
  • 9. } //*************************************************************** // function declaration //**************************************************************** void write_student(); //write the record inbinaryfile void display_all(); //readallrecords frombinaryfile void display_sp(int); //accept rollnoandreadrecord frombinaryfile void modify_student(int); //accept rollnoandupdate recordof binaryfile void delete_student(int); //accept rollnoanddelete selectedrecords frombinaryfile void class_result(); //displayallrecords in tabular format from binaryfile void result(); //displayresult menu void intro(); //displaywelcome screen void entry_menu();//displayentrymenuonscreen //*************************************************************** // THE MAIN FUNCTION OF PROGRAM //**************************************************************** int main() { char ch; cout.setf(ios::fixed|ios::showpoint); cout<<setprecision(2);// program outputs decimal number to two decimal places clrscr(); intro(); do { clrscr(); cout<<"nnntMAIN MENU"; cout<<"nnt01. RESULTMENU"; cout<<"nnt02. ENTRY/EDIT MENU";
  • 10. cout<<"nnt03. EXIT"; cout<<"nntPlease Select Your Option(1-3) "; cin>>ch; clrscr(); switch(ch) { case '1':result(); break; case '2':entry_menu(); break; case '3': break; default :cout<<"a"; } }while(ch!='3'); return 0; } //*************************************************************** // function to write infile //**************************************************************** void write_student() { student st; ofstreamoutFile; outFile.open("student.dat",ios::binary|ios::app); st.getdata(); outFile.write((char *) &st, sizeof(student)); outFile.close(); cout<<"nnStudent record HasBeen Created";
  • 11. cin.ignore(); getch(); } //*************************************************************** // function to read all records from file //**************************************************************** void display_all() { student st; ifstream inFile; inFile.open("student.dat",ios::binary); if(!inFile) { cout<<"File couldnot be open!! Press anyKey..."; getch(); return; } cout<<"nnnttDISPLAY ALL RECORD !!!nn"; while(inFile.read((char *) &st, sizeof(student))) { st.showdata(); cout<<"nn====================================n"; } inFile.close(); getch(); } //*************************************************************** // function to read specific record from file //****************************************************************
  • 12. void display_sp(int n) { student st; ifstream inFile; inFile.open("student.dat",ios::binary); if(!inFile) { cout<<"File couldnot be open!! Press anyKey..."; getch(); return; } int flag=0; while(inFile.read((char *) &st, sizeof(student))) { if(st.retrollno()==n) { st.showdata(); flag=1; } } inFile.close(); if(flag==0) cout<<"nnrecordnot exist"; getch(); } //*************************************************************** // function to modifyrecordof file //****************************************************************
  • 13. void modify_student(int n) { int found=0; student st; fstream File; File.open("student.dat",ios::binary|ios::in|ios::out); if(!File) { cout<<"File couldnot be open!! Press anyKey..."; getch(); return; } while(File.read((char *) &st, sizeof(student))&& found==0) { if(st.retrollno()==n) { st.showdata(); cout<<"nnPlease Enter The New Details ofstudent"<<endl; st.getdata(); int pos=(-1)*sizeof(st); File.seekp(pos,ios::cur); File.write((char *) &st, sizeof(student)); cout<<"nnt RecordUpdated"; found=1; } } File.close(); if(found==0) cout<<"nnRecord Not Found";
  • 14. getch(); } //*************************************************************** // function to delete recordof file //**************************************************************** void delete_student(int n) { student st; ifstream inFile; inFile.open("student.dat",ios::binary); if(!inFile) { cout<<"File couldnot be open!! Press anyKey..."; 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) { outFile.write((char *) &st, sizeof(student)); } } outFile.close(); inFile.close(); remove("student.dat");
  • 15. rename("Temp.dat","student.dat"); cout<<"nntRecordDeleted .."; getch(); } //*************************************************************** // function to displayall students grade report //**************************************************************** void class_result() { student st; ifstream inFile; inFile.open("student.dat",ios::binary); if(!inFile) { cout<<"File couldnot be open!! Press any Key..."; getch(); return; } cout<<"nnttALL STUDENTS RESULT 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(); }
  • 16. //*************************************************************** // function to displayresult menu //**************************************************************** void result() { char ch; int rno; cout<<"nnntRESULT MENU"; cout<<"nnnt1. Class Result"; cout<<"nnt2. Student Report Card"; cout<<"nnt3. Back to Main Menu"; cout<<"nnntEnter Choice (1/2/3)? "; cin>>ch; clrscr(); switch(ch) { case '1' :class_result();break; case '2' :cout<<"nntEnter Roll Number Of Student :"; cin>>rno; display_sp(rno);break; case '3' :break; default :cout<<"a"; } } //*************************************************************** // INTRODUCTION FUNCTION //**************************************************************** void intro() {
  • 17. cout<<"nnntt STUDENT"; cout<<"nnttREPORT CARD"; cout<<"nntt PROJECT"; cout<<"nnntMADEBY :SONALI SINHA"; cout<<"ntSCHOOL :KENDRIYA VIDYALAYA PRAGATI VIHAR"; getch(); } //*************************************************************** // ENTRY / EDIT MENU FUNCTION //**************************************************************** void entry_menu() { char ch; int num; clrscr(); cout<<"nnntENTRY MENU"; cout<<"nnt1.CREATE STUDENT RECORD"; cout<<"nnt2.DISPLAY ALL STUDENTSRECORDS"; cout<<"nnt3.SEARCH STUDENT RECORD "; cout<<"nnt4.MODIFY STUDENT RECORD"; cout<<"nnt5.DELETE STUDENT RECORD"; cout<<"nnt6.BACKTO MAIN MENU"; cout<<"nntPlease Enter Your Choice (1-6) "; cin>>ch; clrscr(); switch(ch) {
  • 18. case '1': write_student();break; case '2': display_all();break; case '3': cout<<"nntPlease Enter The roll number ";cin>>num; display_sp(num);break; case '4': cout<<"nntPlease Enter The roll number ";cin>>num; modify_student(num);break; case '5': cout<<"nntPlease Enter The roll number ";cin>>num; delete_student(num);break; case '6': break; default: cout<<"a";entry_menu(); } } //*************************************************************** // END OF PROJECT //***************************************** OUTPUTOF THE PROGRAMAS EXECUTED
  • 22. BIBLIOGRAPHY 1. COMPUTER SCIENCE WITH C++ , SUMITA ARORA 2. PROJECTYAPA.COM 3. LET US C ++, YASHAVANTKANETKAR