SlideShare une entreprise Scribd logo
1  sur  24
JAWAHAR NAVODAYA
VIDYALAYA
COMPUTER
SCIENCE PROJECT
REPORT
CCE MANAGEMENT
THRISHUL A L
ACKNOWLEDGEMENT
I earnestly thank our Principal
SRI. P.M.ISSAC
Jawahar Navodaya Vidyalaya, Galibeedu for
giving me all the necessary support for
conducting this project I find that its my
earnest endeavor to thank
SRI. HARI OM VERMA
for guiding me all through this project
INDEX
Certificate
Bio data
Aim
Requirements
Program
Output
Bibliography
Jawahar Navoday Vidyalaya
Certificate
This is to certify that the project is bonafide
work done by master THRISHUL A L of class
12th
bearing the hall ticket no. during the
year 2015-2016 for the fulfillment of computer
science project in Jawahar Navodaya Vidyalaya
Galibeedu
Date:
Sign of student: sign of the
teacher in
charge:
Sign of the external Sign of the
examinar : Principal:
Bio data
Name: THRISHUL A L
Class: 12th science
Hall ticket no:
Subject:computerscience
School:JNV coorg
Aim
Propgram in c++ for
CCE MANAGEMENT
Requirements:
 Computer system with windows 7
 Tubo c++ software
CODING
//STUDENT CCE MANAGEMENT
//Submitted By THRISHUL A L( thrrishul.alathanda004@gmail.com )
//password : abcde
#include<conio.h>
#include<iostream.h>
#include<stdio.h>
#include<process.h>
#include<fstream.h>
#include<iomanip.h>
#include<string.h>
class student
{
int rollno;
char name[50];
int p_marks,c_marks,m_marks,e_marks,cs_marks;
float per;
char grade;
int std;
void calculate()
{
per=(p_marks+c_marks+m_marks+e_marks+cs_marks)/5.0;
if(per>=60)
grade='A';
else if(per>=50 && per<60)
grade='B';
else if(per>=33 && per<50)
grade='C';
else
grade='F';
}
public:
void search1();
void getdata()
{
cout<<"nEnter The roll number of student ";
cin>>rollno;
cout<<"nnEnter The Name of student ";
gets(name);
cout<<"nEnter The marks in physics out of 100 : ";
cin>>p_marks;
cout<<"nEnter The marks in chemistry out of 100 : ";
cin>>c_marks;
cout<<"nEnter The marks in maths out of 100 : ";
cin>>m_marks;
cout<<"nEnter The marks in english out of 100 : ";
cin>>e_marks;
cout<<"nEnter The marks in computer science out of 100 : ";
cin>>cs_marks;
calculate();
}
void showdata()
{
cout<<"nRoll number of student : "<<rollno;
cout<<"nName of student : "<<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 of student is :"<<setprecision(2)<<per;
cout<<"nGrade of student is :"<<grade;
}
void show_tabular()
{
cout<<rollno<<setw(12)<<name<<setw(10)<<p_marks<<setw(3)<<c_marks<<set
w(3)<<m_marks<<setw(3)<<
e_marks<<setw(3)<<cs_marks<<setw(6)<<setprecision(3)<<per<<"
"<<grade<<endl;
}
int retrollno()
{ return rollno; }
}s,to;
fstream fp,t;
student st;
void write_student()
{
fp.open("stude.dat",ios::app);
st.getdata();
fp.write((char*)&st,sizeof(student));
fp.close();
cout<<"nnstudent record Has Been Created ";
getch();
}
void display_all()
{
clrscr();
cout<<"nnnttDISPLAY ALL RECORD !!!nn";
fp.open("stude.dat",ios::in);
while(fp.read((char*)&st,sizeof(student)))
{
st.showdata();
cout<<"nn====================================n";
getch();
}
fp.close();
getch();
}
void display_sp(int n)
{
int flag=0;
fp.open("stude.dat",ios::in);
while(fp.read((char*)&st,sizeof(student)))
{
if(st.retrollno()==n)
{
clrscr();
st.showdata();
flag=1;
}
}
fp.close();
if(flag==0)
cout<<"nnrecord not exist";
getch();
}
void modify_student()
{
int no,found=0;
clrscr();
cout<<"nntTo Modify ";
cout<<"nntPlease Enter The roll number of student";
cin>>no;
fp.open("stude.dat",ios::in|ios::out);
while(fp.read((char*)&st,sizeof(student)) && found==0)
{
if(st.retrollno()==no)
{
st.showdata();
cout<<"nPlease Enter The New Details of student"<<endl;
st.getdata();
int pos=-1*sizeof(st);
fp.seekp(pos,ios::cur);
fp.write((char*)&st,sizeof(student));
cout<<"nnt Record Updated";
found=1;
}
}
fp.close();
if(found==0)
cout<<"nn Record Not Found ";
getch();
}
void delete_student()
{
int no;
clrscr();
cout<<"nnntDelete Record";
cout<<"nnPlease Enter The roll number of student You Want To
Delete";
cin>>no;
fp.open("stude.dat",ios::in|ios::out);
fstream fp2;
fp2.open("Temp.dat",ios::out);
fp.seekg(0,ios::beg);
while(fp.read((char*)&st,sizeof(student)))
{
if(st.retrollno()!=no)
{
fp2.write((char*)&st,sizeof(student));
}
}
fp2.close();
fp.close();
remove("stude.dat");
rename("Temp.dat","stude.dat");
cout<<"nntRecord Deleted ..";
getch();
}
void class_result()
{
clrscr();
fp.open("stude.dat",ios::in);
if(!fp)
{
cout<<"ERROR!!! FILE COULD NOT BE OPENnnn Go
To Entry Menu to create File";
cout<<"nnn Program is closing ....";
getch();
exit(0);
}
cout<<"nnttALL STUDENTS RESULT nn";
cout<<"====================================================n";
cout<<"Roll No. Name P C M E CS %age Graden";
cout<<"====================================================n";
while(fp.read((char*)&st,sizeof(student)))
{
st.show_tabular();
}
fp.close();
getch();
}
void result()
{ int ans,rno;
clrscr();
cout<<"nnnRESULT MENU";
cout<<"nnn1. Class Resultnn2. Student Report
Cardnn3.Back to Main Menu";
cout<<"nnnEnter Choice (1/2)? ";
cin>>ans ;
switch(ans)
{
case 1 : class_result();break;
case 2 : {
do{
clrscr();
char ans;
cout<<"nnEnter Roll Number Of Student : ";
cin>>rno;
display_sp(rno);
cout<<"nnDo you want to See More Result
(y/n)?";
cin>>ans;
}while(ans=='y'||ans=='Y');
break;
}
case 3: break;
default: cout<<"a";
}
}
void intro()
{
clrscr();
gotoxy(35,11);
cout<<"STUDENT";
gotoxy(33,14);
cout<<"REPORT CARD";
gotoxy(35,17);
cout<<"PROJECT";
cout<<"nnMADE BY : Thrishul A L";
cout<<"nnSCHOOL : JNV Coorg";
getch();
}
void entry_menu()
{
clrscr();
char ch2;
cout<<"nnntENTRY MENU";
cout<<"nnt1.CREATE STUDENT RECORD";
cout<<"nnt2.DISPLAY ALL STUDENTS RECORDS";
cout<<"nnt3.SEARCH STUDENT RECORD ";
cout<<"nnt4.MODIFY STUDENT RECORD";
cout<<"nnt5.DELETE STUDENT RECORD";
cout<<"nnt6.BACK TO MAIN MENU";
cout<<"nnt7.SEARCH BY NAME";
cout<<"nntPlease Enter Your Choice (1-6) ";
ch2=getche();
switch(ch2)
{
case '1': clrscr();
write_student();
break;
case '2': display_all();break;
case '3':
int num;
clrscr();
cout<<"nntPlease Enter The roll number
";
cin>>num;
display_sp(num);
break;
case '4': modify_student();break;
case '5': delete_student();break;
case '6': break;
case '7': to.search1();
default:cout<<"a";entry_menu();
}
}
int passwords()
{
char p1,p2,p3,p4,p5;
gotoxy(30,10);
cout<<"ENTER THE PASSWORDn";
gotoxy(30,20);
p1=getch();
cout<<"*";
p2=getch();
cout<<"*";
p3=getch();
cout<<"*";
p4=getch();
cout<<"*";
p5=getch();
cout<<"*";
getch();
gotoxy(30,20);
if((p1=='a'||p1=='A')&&(p2=='b'||p2=='B')&&(p3=='c'||p3=='C')&&
(p4=='d'||p4=='D')&&(p5=='e'||p5=='E'))
return 1;
else
return 0;
}
void search1();
void student::search1()
{
clrscr();
char names[20];
t.open("stude.dat",ios::in);
int flag=0;
cout<<"n";
cout<<"ttt*-----------*"<<"n";
cout<<"ttt| SEARCHING |"<<"n";
cout<<"ttt*-----------*"<<"n"<<"n";
cout<<"ntENTER THE NAME TO BE SEARCHED :";
gets(names);
cout<<"n";
cout<<"ROLL NAME MARKS PERCENTAGE GRADE"<<"n";
for(int i=0;i<2;i++)
{
while(t.read((char *) &s,sizeof(s)))
{
if(strcmp(names,s.name)==0)
{
flag=1;
s.showdata();
break;
}
}
}
if(flag==0)
{
cout<<"tSORRYn";
cout<<"tTHE NAME DOES NOT EXIST.n";
}
getch();
}
void main()
{
cout<<"t%% %% ";
cout<<"nt%% %% %%%%%%% %% %%%%%% %%%%%% %%%%
%%%% %%%%%%%";
cout<<"nt%% %% %% %% %% %% %% %% %%%
%% %% ";
cout<<"nt%% %% %% %%%%% %% %% %% %% %% %%%
%% %%%%% ";
cout<<"nt%% %% %% %% %% %% %% %% %%
%% %% ";
cout<<"nt%%%%%%%%%% %%%%%%% %%%%%%% %%%%%%% %%%%%% %%
%% %%%%%%% ";
cout<<"nnttt $$$$$$$$ $$$$$ ";
cout<<"nttt $$ $ $ ";
cout<<"nttt $$ $$$$$ ";
cout<<"nnntCOMPUTER PROJECT (******** CCE PROJECT>>
*******)";
cout<<"nntttt BY :-";
cout<<"nnttt* Thrishul A L"<<"t XII Sci.";
cout<<" nnntt press any KEY to continue!!! ";
getch();
char ch;
intro();
clrscr();
cout<<"nntt CONTINUOUS & COMPREHENSIVE EVALUATION(CCE)n";
cout<<"tt **************************************** n";
int passwords();
if(!passwords())
{
for(int i=0;i<2;i++)
{
clrscr();
cout<<"nWrong password try once moren";
if(passwords())
{
goto last;
}
else
{
clrscr();
cout<<"nnttt all attempts
failed.....";
cout<<"nnnttt see
you.................. ";
exit(0);
}
}
cout<<"ttt sorry all attempts failed.............
n tttinactive";
}
else do
{
last:;
clrscr();
cout<<"nnntMAIN MENU";
cout<<"nnt01. RESULT MENU";
cout<<"nnt02. ENTRY/EDIT MENU";
cout<<"nnt03. EXIT";
cout<<"nntPlease Select Your Option (1-3) ";
ch=getche();
switch(ch)
{
case '1': clrscr();
result();
break;
case '2': entry_menu();
break;
case '3':exit(0);
default :cout<<"a";
}
}while(ch!='3');
}
OUT PUTS
Bibliography
www.google .com
Programming in c++
Projects in c++
www.icbse.com
CCE management system

Contenu connexe

Similaire à CCE management system

Aditya Singh Final Project(Academics Management)
Aditya Singh Final Project(Academics Management)Aditya Singh Final Project(Academics Management)
Aditya Singh Final Project(Academics Management)
Aditya Singh
 
Below is my code for C++- I keep getting an error 43 5 C--Progr.pdf
Below is my code for C++- I keep getting an error  43    5    C--Progr.pdfBelow is my code for C++- I keep getting an error  43    5    C--Progr.pdf
Below is my code for C++- I keep getting an error 43 5 C--Progr.pdf
anilbhagat17
 

Similaire à CCE management system (20)

Rakesh Bijawat , BCA Third Year
Rakesh Bijawat , BCA Third YearRakesh Bijawat , BCA Third Year
Rakesh Bijawat , BCA Third Year
 
computer project code ''payroll'' (based on datafile handling)
computer project code ''payroll'' (based on datafile handling)computer project code ''payroll'' (based on datafile handling)
computer project code ''payroll'' (based on datafile handling)
 
Student DATABASE MANAGeMEnT SysTEm
Student DATABASE MANAGeMEnT SysTEmStudent DATABASE MANAGeMEnT SysTEm
Student DATABASE MANAGeMEnT SysTEm
 
LAB 2 Report.docx
LAB 2 Report.docxLAB 2 Report.docx
LAB 2 Report.docx
 
Online exam
Online examOnline exam
Online exam
 
C++ coding for Banking System program
C++ coding for Banking System programC++ coding for Banking System program
C++ coding for Banking System program
 
College management
College managementCollege management
College management
 
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
 
Investigatory Project for Computer Science
Investigatory Project for Computer Science Investigatory Project for Computer Science
Investigatory Project for Computer Science
 
Kajal Gaharwal , BCA Third Year
Kajal Gaharwal , BCA Third YearKajal Gaharwal , BCA Third Year
Kajal Gaharwal , BCA Third Year
 
Codes on structures
Codes on structuresCodes on structures
Codes on structures
 
Aditya Singh Final Project(Academics Management)
Aditya Singh Final Project(Academics Management)Aditya Singh Final Project(Academics Management)
Aditya Singh Final Project(Academics Management)
 
Computer science project
Computer science projectComputer science project
Computer science project
 
Hardik Jadam , BCA Third Year
Hardik Jadam , BCA Third YearHardik Jadam , BCA Third Year
Hardik Jadam , BCA Third Year
 
C++ program using class
C++ program using classC++ program using class
C++ program using class
 
Deepika Mittal , BCA Third Year
Deepika Mittal , BCA Third YearDeepika Mittal , BCA Third Year
Deepika Mittal , BCA Third Year
 
Vinita Vaishnav , BCA Third Year
Vinita Vaishnav , BCA Third YearVinita Vaishnav , BCA Third Year
Vinita Vaishnav , BCA Third Year
 
Below is my code for C++- I keep getting an error 43 5 C--Progr.pdf
Below is my code for C++- I keep getting an error  43    5    C--Progr.pdfBelow is my code for C++- I keep getting an error  43    5    C--Progr.pdf
Below is my code for C++- I keep getting an error 43 5 C--Progr.pdf
 
Computer Science investigatory project class 12
Computer Science investigatory project class 12Computer Science investigatory project class 12
Computer Science investigatory project class 12
 
KBC c++ program
KBC c++ programKBC c++ program
KBC c++ program
 

Dernier

1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
QucHHunhnh
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
SoniaTolstoy
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
fonyou31
 

Dernier (20)

1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writing
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdf
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpin
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 

CCE management system

  • 2. ACKNOWLEDGEMENT I earnestly thank our Principal SRI. P.M.ISSAC Jawahar Navodaya Vidyalaya, Galibeedu for giving me all the necessary support for conducting this project I find that its my earnest endeavor to thank SRI. HARI OM VERMA for guiding me all through this project
  • 4. Jawahar Navoday Vidyalaya Certificate This is to certify that the project is bonafide work done by master THRISHUL A L of class 12th bearing the hall ticket no. during the year 2015-2016 for the fulfillment of computer science project in Jawahar Navodaya Vidyalaya Galibeedu Date:
  • 5. Sign of student: sign of the teacher in charge: Sign of the external Sign of the examinar : Principal: Bio data Name: THRISHUL A L Class: 12th science Hall ticket no:
  • 7.
  • 8. Requirements:  Computer system with windows 7  Tubo c++ software
  • 10. //STUDENT CCE MANAGEMENT //Submitted By THRISHUL A L( thrrishul.alathanda004@gmail.com ) //password : abcde #include<conio.h> #include<iostream.h> #include<stdio.h> #include<process.h> #include<fstream.h> #include<iomanip.h> #include<string.h> class student { int rollno; char name[50]; int p_marks,c_marks,m_marks,e_marks,cs_marks; float per; char grade;
  • 11. int std; void calculate() { per=(p_marks+c_marks+m_marks+e_marks+cs_marks)/5.0; if(per>=60) grade='A'; else if(per>=50 && per<60) grade='B'; else if(per>=33 && per<50) grade='C'; else grade='F'; } public: void search1(); void getdata() { cout<<"nEnter The roll number of student "; cin>>rollno; cout<<"nnEnter The Name of student "; gets(name); cout<<"nEnter The marks in physics out of 100 : "; cin>>p_marks; cout<<"nEnter The marks in chemistry out of 100 : "; cin>>c_marks; cout<<"nEnter The marks in maths out of 100 : "; cin>>m_marks; cout<<"nEnter The marks in english out of 100 : "; cin>>e_marks; cout<<"nEnter The marks in computer science out of 100 : "; cin>>cs_marks; calculate(); } void showdata() { cout<<"nRoll number of student : "<<rollno; cout<<"nName of student : "<<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 of student is :"<<setprecision(2)<<per; cout<<"nGrade of student is :"<<grade; } void show_tabular() { cout<<rollno<<setw(12)<<name<<setw(10)<<p_marks<<setw(3)<<c_marks<<set w(3)<<m_marks<<setw(3)<< e_marks<<setw(3)<<cs_marks<<setw(6)<<setprecision(3)<<per<<" "<<grade<<endl;
  • 12. } int retrollno() { return rollno; } }s,to; fstream fp,t; student st; void write_student() { fp.open("stude.dat",ios::app); st.getdata(); fp.write((char*)&st,sizeof(student)); fp.close(); cout<<"nnstudent record Has Been Created "; getch(); } void display_all() { clrscr(); cout<<"nnnttDISPLAY ALL RECORD !!!nn"; fp.open("stude.dat",ios::in); while(fp.read((char*)&st,sizeof(student))) { st.showdata(); cout<<"nn====================================n"; getch(); } fp.close(); getch(); } void display_sp(int n) { int flag=0; fp.open("stude.dat",ios::in); while(fp.read((char*)&st,sizeof(student))) { if(st.retrollno()==n) { clrscr(); st.showdata(); flag=1; } } fp.close(); if(flag==0) cout<<"nnrecord not exist"; getch(); }
  • 13. void modify_student() { int no,found=0; clrscr(); cout<<"nntTo Modify "; cout<<"nntPlease Enter The roll number of student"; cin>>no; fp.open("stude.dat",ios::in|ios::out); while(fp.read((char*)&st,sizeof(student)) && found==0) { if(st.retrollno()==no) { st.showdata(); cout<<"nPlease Enter The New Details of student"<<endl; st.getdata(); int pos=-1*sizeof(st); fp.seekp(pos,ios::cur); fp.write((char*)&st,sizeof(student)); cout<<"nnt Record Updated"; found=1; } } fp.close(); if(found==0) cout<<"nn Record Not Found "; getch(); } void delete_student() { int no; clrscr(); cout<<"nnntDelete Record"; cout<<"nnPlease Enter The roll number of student You Want To Delete"; cin>>no; fp.open("stude.dat",ios::in|ios::out); fstream fp2; fp2.open("Temp.dat",ios::out); fp.seekg(0,ios::beg); while(fp.read((char*)&st,sizeof(student))) { if(st.retrollno()!=no) { fp2.write((char*)&st,sizeof(student)); } }
  • 14. fp2.close(); fp.close(); remove("stude.dat"); rename("Temp.dat","stude.dat"); cout<<"nntRecord Deleted .."; getch(); } void class_result() { clrscr(); fp.open("stude.dat",ios::in); if(!fp) { cout<<"ERROR!!! FILE COULD NOT BE OPENnnn Go To Entry Menu to create File"; cout<<"nnn Program is closing ...."; getch(); exit(0); } cout<<"nnttALL STUDENTS RESULT nn"; cout<<"====================================================n"; cout<<"Roll No. Name P C M E CS %age Graden"; cout<<"====================================================n"; while(fp.read((char*)&st,sizeof(student))) { st.show_tabular(); } fp.close(); getch(); } void result() { int ans,rno; clrscr(); cout<<"nnnRESULT MENU"; cout<<"nnn1. Class Resultnn2. Student Report Cardnn3.Back to Main Menu"; cout<<"nnnEnter Choice (1/2)? "; cin>>ans ; switch(ans) { case 1 : class_result();break; case 2 : { do{ clrscr(); char ans; cout<<"nnEnter Roll Number Of Student : "; cin>>rno; display_sp(rno);
  • 15. cout<<"nnDo you want to See More Result (y/n)?"; cin>>ans; }while(ans=='y'||ans=='Y'); break; } case 3: break; default: cout<<"a"; } } void intro() { clrscr(); gotoxy(35,11); cout<<"STUDENT"; gotoxy(33,14); cout<<"REPORT CARD"; gotoxy(35,17); cout<<"PROJECT"; cout<<"nnMADE BY : Thrishul A L"; cout<<"nnSCHOOL : JNV Coorg"; getch(); } void entry_menu() { clrscr(); char ch2; cout<<"nnntENTRY MENU"; cout<<"nnt1.CREATE STUDENT RECORD"; cout<<"nnt2.DISPLAY ALL STUDENTS RECORDS"; cout<<"nnt3.SEARCH STUDENT RECORD "; cout<<"nnt4.MODIFY STUDENT RECORD"; cout<<"nnt5.DELETE STUDENT RECORD"; cout<<"nnt6.BACK TO MAIN MENU"; cout<<"nnt7.SEARCH BY NAME"; cout<<"nntPlease Enter Your Choice (1-6) "; ch2=getche(); switch(ch2) { case '1': clrscr(); write_student(); break; case '2': display_all();break; case '3': int num; clrscr(); cout<<"nntPlease Enter The roll number "; cin>>num; display_sp(num);
  • 16. break; case '4': modify_student();break; case '5': delete_student();break; case '6': break; case '7': to.search1(); default:cout<<"a";entry_menu(); } } int passwords() { char p1,p2,p3,p4,p5; gotoxy(30,10); cout<<"ENTER THE PASSWORDn"; gotoxy(30,20); p1=getch(); cout<<"*"; p2=getch(); cout<<"*"; p3=getch(); cout<<"*"; p4=getch(); cout<<"*"; p5=getch(); cout<<"*"; getch(); gotoxy(30,20); if((p1=='a'||p1=='A')&&(p2=='b'||p2=='B')&&(p3=='c'||p3=='C')&& (p4=='d'||p4=='D')&&(p5=='e'||p5=='E')) return 1; else return 0; } void search1(); void student::search1() { clrscr(); char names[20]; t.open("stude.dat",ios::in); int flag=0; cout<<"n"; cout<<"ttt*-----------*"<<"n"; cout<<"ttt| SEARCHING |"<<"n"; cout<<"ttt*-----------*"<<"n"<<"n"; cout<<"ntENTER THE NAME TO BE SEARCHED :"; gets(names); cout<<"n"; cout<<"ROLL NAME MARKS PERCENTAGE GRADE"<<"n"; for(int i=0;i<2;i++) { while(t.read((char *) &s,sizeof(s)))
  • 17. { if(strcmp(names,s.name)==0) { flag=1; s.showdata(); break; } } } if(flag==0) { cout<<"tSORRYn"; cout<<"tTHE NAME DOES NOT EXIST.n"; } getch(); } void main() { cout<<"t%% %% "; cout<<"nt%% %% %%%%%%% %% %%%%%% %%%%%% %%%% %%%% %%%%%%%"; cout<<"nt%% %% %% %% %% %% %% %% %%% %% %% "; cout<<"nt%% %% %% %%%%% %% %% %% %% %% %%% %% %%%%% "; cout<<"nt%% %% %% %% %% %% %% %% %% %% %% "; cout<<"nt%%%%%%%%%% %%%%%%% %%%%%%% %%%%%%% %%%%%% %% %% %%%%%%% "; cout<<"nnttt $$$$$$$$ $$$$$ "; cout<<"nttt $$ $ $ "; cout<<"nttt $$ $$$$$ "; cout<<"nnntCOMPUTER PROJECT (******** CCE PROJECT>> *******)"; cout<<"nntttt BY :-"; cout<<"nnttt* Thrishul A L"<<"t XII Sci."; cout<<" nnntt press any KEY to continue!!! "; getch(); char ch; intro(); clrscr(); cout<<"nntt CONTINUOUS & COMPREHENSIVE EVALUATION(CCE)n"; cout<<"tt **************************************** n"; int passwords();
  • 18. if(!passwords()) { for(int i=0;i<2;i++) { clrscr(); cout<<"nWrong password try once moren"; if(passwords()) { goto last; } else { clrscr(); cout<<"nnttt all attempts failed....."; cout<<"nnnttt see you.................. "; exit(0); } } cout<<"ttt sorry all attempts failed............. n tttinactive"; } else do { last:; clrscr(); cout<<"nnntMAIN MENU"; cout<<"nnt01. RESULT MENU"; cout<<"nnt02. ENTRY/EDIT MENU"; cout<<"nnt03. EXIT"; cout<<"nntPlease Select Your Option (1-3) "; ch=getche(); switch(ch) { case '1': clrscr(); result(); break; case '2': entry_menu(); break; case '3':exit(0); default :cout<<"a"; } }while(ch!='3'); }
  • 20.
  • 21.
  • 22.
  • 23. Bibliography www.google .com Programming in c++ Projects in c++ www.icbse.com