SlideShare a Scribd company logo
1 of 26
1
RMK SENIOR SECONDARY SCHOOL
THIRUVERKADU, CHENNAI-77
(Affiliated to the Central Board of Secondary Education ,Delhi)
RSM Nagar, sundracholapuram Road Thiruverkadu
Chennai-600 077 Website: rmkschool.in
ROLL NO:
ALL INDIA SENIOR SCHOOLCERTIFICATE EXAMINATION
Academic year: 2017-2018
DEPARTMENT OF COMPUTER SCIENCE
2
RMK SENIOR SECONDARY SCHOOL
THIRUVERKADU, CHENNAI-77
DEPARTMENT OF COMPUTER SCIENCE
This is to certify that ....................................................ofclass ...........has
performed ................................during theyear 2017-2018 atthe school
laboratory and thathis/her project report is certified as bonafide.His/Her
examination roll no is.................
.....................................
Head of Department
Date................... Computer science
Submitted for the All-India Senior SecondarySchool Certificate Examination-
2018 (PracticalExamination)in ComputerScience at RMK SENIOR
SECONDARYSCHOOLOn....................................
........................................ ......................................................
Internal Examiner External Examiner
Date.............................. Date...............................................
Signature of Principal
…….............................
3
COMPUTER
SCIENCE
PROJECT
PLAYER PROFILE
MANAGEMENT
BY:
T.JEGADEESHWARAN
4
ACKNOWLEDGEMENT
I hereby acknowledge all those people, who
have helped for the successful completion of
my project to a great extend.
I would also like to convey a special thanks
to our principal Mrs.Indira Rangan and the
school management for having provided me
with complete access to all materials and
information sources available in the
laboratory.
I express my deepest gratitude to our
computer teacher Smt.L.Ramadevi for her
untiring help and encouragement during the
course of the project titled
“PLAYER PROFILE MANAGEMENT “.
I would also like to extend my thanks to
other members of the computer department
for their co-operation.
5
INDEX
SNO TITLE PAGE NO
1
INTRODUCTION
6
2
ALGORITHM 7
3
SOURCE CODE 10
4
SCREEN SHOTS 20
5
BIBLOGRAPHY 26
6
INTRODUCTION
In this PLAYER PROFILE MANAGEMENT
SYSTEM project you can manage a Profile
of a cricketer’s career. You can Create a
new profile, Display a player profile,
Modify profile of the player and delete an
existing player profile. Jersey number of
a player is Fixed. You can also calculate
the Average, Strike rate of a player in
Batting section. Bowling Average,
Economy and Strike rate of each player
in Bowling section.
7
ALGORITHM
Class name : player
Data members : pname, department, age, jno,
matches, runs, inn, outs, bavg,
nballs, economy, sr, avg, overs,
wickets, bruns, bsr.
Member functions: cprofile(), showprofile(), getjno(),
modifypro(), caverage() ,
cstrikerate(), ceconomy(),
bowlingsr(), baverage().
Object used :p1
--------------------------------------------------------------
Function Name : cprofile()
Parameters passed : nil
Return type :nil
To add a player profile.
--------------------------------------------------------------
Function name : showprofile()
Parameters passed :nil
Return type :nil
To display the profile of a added player.
--------------------------------------------------------------
Function name : getjno()
Parameters passed : nil
Return type : int
To return Jersey number.
--------------------------------------------------------------
Function name : modifypro()
Parameters passed : char *ch
Return type : nil
To modify profile details of a player.
8
Function name : caverage()
Parameters passed : nil
Return type : nil
To calculate the batting average of the player.
--------------------------------------------------------------
Function name : cstrikerate()
Parameters passed : nil
Return type : nil
To calculate the batting strikerate of the player.
--------------------------------------------------------------
Function name : ceconomy()
Parameters passed : nil
Return type : nil
To calculate the bowling economy of a player.
--------------------------------------------------------------
Function name : bowlingsr()
Parameters passed : nil
Return type : nil
To calculate the bowling strike rate of a player.
--------------------------------------------------------------
Function name : baverage()
Parameters passed : nil
Return type : nil
To calculate the bowling average of a player.
--------------------------------------------------------------
Function name : writeprofile()
Parameters passed : nil
Return type : nil
To write player data into the file .
--------------------------------------------------------------
Function name : specidisplay()
Parameters passed : nil
9
Return type : nil
To display the player profile from the file.
Function name : modifyprofile()
Parameters passed : nil
Return type : nil
To modify a player profile.
--------------------------------------------------------------
Function name : deleteprofile()
Parameters passed : nil
Return type : nil
To delete a player profile from the file.
--------------------------------------------------------------
Function name : intro()
Parameters passed : nil
Return type : nil
--------------------------------------------------------------
Function name : menu()
Parameters passed : nil
Return type : nil
To display the choices offered.
--------------------------------------------------------------
Function name : main()
Parameters passed : nil
Return type : nil
Main module.
--------------------------------------------------------------
10
SOURCE
CODE
11
//***************************************************************
// HEADER FILE USED IN PROJECT
//****************************************************************
#include<process.h>
#include<fstream.h>
#include<ctype.h>
#include<iomanip.h>
#include<conio.h>
#include<stdio.h>
#include<string.h>
#include<math.h>
//***************************************************************
// CLASS USED IN PROJECT
//****************************************************************
class player
{
char pname[30];
char department[30];
int age;
int jno;
double matches;
double runs;
double inn;
double outs,bavg;
double nballs;
double economy,sr,avg,overs;
double wickets,bruns;
double bsr;
public:
void cprofile()
{
cout<<"__________________________________________________";
cout<<"n ENTER NAME OF PLAYER:";
gets(pname);
cout<<"n ENTER DEPARTMENT:";
gets(department);
cout<<"n Enter jersey number:";
cin>>jno;
cout<<"n ENTER AGE OF PLAYER:";
cin>>age;
cout<<"n Enter no of matches:";
cin>>matches;
12
cout<<"n ENTER NO OF RUNS SCORED:";
cin>>runs;
cout<<"n ENTER NO OF INNINGS:";
cin>>inn;
cout<<"n ENTER NO OF TIMES PLAYER GOT OUT:";
cin>>outs;
cout<<"n Enter no of balls faced:";
cin>>nballs;
cout<<"n ENter no of overs bowled by bowler:";
cin>>overs;
cout<<"n Enter wickets taken by player:";
cin>>wickets;
cout<<"n Runs left by player:";
cin>>bruns;
cout<<"______________________________________________________";
}
void showprofile()
{
cout<<"_____________________________________________________";
cout<<"n NAME OF PLAYER:";
puts(pname);
cout<<"n DEPARTMENT:";
puts(department);
cout<<"n JERSEY NUMBER OF PLAYER:";
cout<<jno;
cout<<"n AGE OF PLAYER:";
cout<<age;
cout<<"n no of matches:";
cout<<matches;
cout<<"n NO OF RUNS SCORED:";
cout<<runs;
cout<<"n NO OF INNINGS:";
cout<<inn;
cout<<"n NO OF TIMES PLAYER GOT OUT:";
cout<<outs;
cout<<"n NO of balls faced:";
cout<<nballs;
cout<<"n no of overs bowled by bowler:";
cout<<overs;
cout<<"n wickets taken by player:";
cout<<wickets;
cout<<"n Runs left by player:";
cout<<bruns;
13
cout<<"n__________________________________________________";
}
int getjno()
{
return jno;
}
void modifypro(char *ch)
{ cout<<"__________________________________________________";
if(strcmpi(ch,"name")==0)
{
cout<<"n ENTER NAME OF PLAYER:";
gets(pname);
}
else if(strcmpi(ch,"department")==0)
{
cout<<"n ENTER DEPARTMENT:";
gets(department);
}
else if(strcmpi(ch,"age")==0)
{
cout<<"n ENTER AGE OF PLAYER:";
cin>>age;
}
else if(strcmpi(ch,"matches")==0)
{
cout<<"n ENter no of matches:";
cin>>matches;
}
else if(strcmpi(ch,"runs")==0)
{
cout<<"n ENTER NO OF RUNS SCORED:";
cin>>runs;
}
else if(strcmpi(ch,"innings")==0)
{
cout<<"n ENTER NO OF INNINGS:";
cin>>inn;
}
else if(strcmpi(ch,"out")==0)
{
cout<<"n ENTER NO OF TIMES PLAYER GOT OUT:";
cin>>outs;
}
14
else if(strcmpi(ch,"balls")==0)
{
cout<<"n Enter no of balls faced:";
cin>>nballs;
}
else if(strcmpi(ch,"over")==0)
{
cout<<"n ENter no of overs bowled by bowler:";
cin>>overs;
}
else if(strcmpi(ch,"wickets")==0)
{
cout<<"n Enter wickets taken by player:";
cin>>wickets;
}
else
{
cout<<"n Runs left by player:";
cin>>bruns;
}
}
void caverage()
{
avg=(runs)/outs;
cout<<"n Average of player:"<<avg;
}
void cstrikerate()
{
sr=(runs*100)/nballs;
cout<<"n STRIKE RATE OF THE PLAYER:"<<sr;
}
void ceconomy()
{
economy=bruns/overs;
cout<<"n ECONOMY OF THE PLAYER:"<<economy;
}
void bowlingsr()
{
bsr=(overs*6)/wickets;
cout<<"n Bowling strike rate of player:"<<bsr;
}
void baverage()
15
{
bavg=bruns/wickets;
cout<<"n BOWLING AVERAGE OF THE PLAYER:"<<bavg;
}
};
//***************************************************************
// global declaration for object
//***************************************************************
player p1;
//***************************************************************
// function to write in file
//***************************************************************
void writeprofile()
{clrscr();
ofstream fout("player1.dat",ios::binary|ios::app);
p1.cprofile();
fout.write((char*)&p1,sizeof(p1));
fout.close();
}
//***************************************************************
// function to read specific record from file
//***************************************************************
void specidisplay()
{
player p1;
int found=0,n;
ifstream fin("player1.dat",ios::in);
cout<<"n ENTER JERSEY NUMBER OF THE PLAYER: ";cin>>n;
while(fin.read((char*)&p1,sizeof(p1)))
{
if(p1.getjno()==n)
{
clrscr();
p1.showprofile();
p1.caverage();
p1.cstrikerate();
p1.ceconomy();
p1.bowlingsr();
p1.baverage();
found=1;
} }
16
if(found==0)
{
cout<<"n PLAYER DOES NOT EXIST:";
}
}
//***************************************************************
// function to modify record of file
//***************************************************************
void modifyprofile()
{
clrscr();
char *ch;
int n,temp=0;
cout<<"n ENTER THE PLAYER JERSEY NUMBER:";cin>>n;
ifstream fin("player1.dat",ios::binary|ios::in);
ofstream fout("playertemp.dat",ios::binary|ios::app);
while(fin.read((char*)&p1,sizeof(p1)))
{
if(p1.getjno()==n)
{ cout<<"n ENTER THE AREA TO BE CHANGED:";
gets(ch);
cout<<"n ENTER NEW DETAILS:";
p1.modifypro(ch);
fout.write((char*)&p1,sizeof(p1));
cout<<"n RECORD MODIFIED!!!!!!";
temp=1;
}
else
{
fout.write((char*)&p1,sizeof(p1));
}
}
fin.close();
fout.close();
remove("player1.dat");
rename("playertemp.dat","player1.dat");
if(temp==0)
cout<<"n NO RECORDS ARE CREATED";
}
17
//***************************************************************
// function to delete record of file
//***************************************************************
void deleteprofile()
{
clrscr();
ifstream fin("player1.dat",ios::binary|ios::in);
ofstream fout("playertemp.dat",ios::binary|ios::app);
int n,temp=0;
cout<<"n ENTER JERSEY NO OF THE PLAYER:";cin>>n;
while(fin.read((char*)&p1,sizeof(p1)))
{
if(p1.getjno()==n)
{ cout<<"n RECORD DELETED!!!";
temp=1;
}
else
{
fout.write((char*)&p1,sizeof(p1));
}
}
fin.close();
fout.close();
remove("player1.dat");
rename("playertemp.dat","player1.dat");
if(temp==0)
cout<<"n NO RECORDS ARE CREATED!!!!!!!!!!!!!!!";
}
//***************************************************************
// INTRODUCTION FUNCTION
//***************************************************************
void intro()
{
cout<<"n PLAYER PROFILE MANAGEMENT SYSTEM";
cout<<"nn MADE BY:";
cout<<"n n PRADEEP.K.V";
cout<<"n T.JEGADEESHWARAN";
getch();
}
18
//***************************************************************
// MENU FUNCTION
//***************************************************************
void menu()
{ char ch,c='y';
int n;
clrscr();
intro();
do
{ clrscr();
cout<<"n MAIN MENU:";
cout<<"n 1.CREATE NEW PROFILE:";
cout<<"n 2.DISPLAY PROFILE OF CERTAIN PLAYER:";
cout<<"n 3.MODIFY ALL PLAYER PROFILES:";
cout<<"n 4.CLOSE A PLAYER PROFILE:";
cout<<"n 5.EXIT:";
cout<<"n SELECT YOUR OPTION(1-5):";
cin>>ch;
clrscr();
switch(ch)
{
case '1':writeprofile() ;
break;
case '2':specidisplay();
break;
case '3':modifyprofile();
break;
case '4':deleteprofile();
break;
case '5':exit(0);
default:cout<<"n******************************************";
}
cout<<"n DO YOU WANT TO CONTINUE:";
cin>>c;
}while((c=='y')||(c=='Y'));
}
19
//***************************************************************
// MAIN FUNCTION OF THE PROGRAM
//***************************************************************
void main()
{
textbackground(BLACK);
textcolor(WHITE);
clrscr();
menu();
getch();
}
20
SCREEN
SHOTS
21
22
23
24
25
26
BIBLIOGRAPHY:
1) Together with C++ - SUMITA ARORA.
2) TURBO C++ help.

More Related Content

Similar to PLAYER PROFILE MANAGEMENT COMPUTER SCIENCE

computerscience-170129081612.pdf
computerscience-170129081612.pdfcomputerscience-170129081612.pdf
computerscience-170129081612.pdfKiranKumari204016
 
Computer science class 12 project on Super Market Billing
Computer science class 12 project on Super Market BillingComputer science class 12 project on Super Market Billing
Computer science class 12 project on Super Market BillingHarsh Kumar
 
Library Management System in c++
Library Management System in c++Library Management System in c++
Library Management System in c++vikram mahendra
 
computer science c++ project class xii
computer science c++ project class xiicomputer science c++ project class xii
computer science c++ project class xiiYogesh Saini
 
computer project on shopping mall..cbse 2017-2018 project
computer project on shopping mall..cbse 2017-2018 projectcomputer project on shopping mall..cbse 2017-2018 project
computer project on shopping mall..cbse 2017-2018 projectRóhït Ràút
 
MySQL 8.0.18 - New Features Summary
MySQL 8.0.18 - New Features SummaryMySQL 8.0.18 - New Features Summary
MySQL 8.0.18 - New Features SummaryOlivier DASINI
 
Instruction1. Please read the two articles. (Kincheloe part 1 &.docx
Instruction1. Please read the two articles. (Kincheloe part 1 &.docxInstruction1. Please read the two articles. (Kincheloe part 1 &.docx
Instruction1. Please read the two articles. (Kincheloe part 1 &.docxcarliotwaycave
 
BSA 376 Enhance teaching - snaptutorial.com
BSA 376 Enhance teaching - snaptutorial.comBSA 376 Enhance teaching - snaptutorial.com
BSA 376 Enhance teaching - snaptutorial.comdonaldzs51
 

Similar to PLAYER PROFILE MANAGEMENT COMPUTER SCIENCE (20)

computerscience-170129081612.pdf
computerscience-170129081612.pdfcomputerscience-170129081612.pdf
computerscience-170129081612.pdf
 
Sunil
SunilSunil
Sunil
 
Durgesh
DurgeshDurgesh
Durgesh
 
Computer science class 12 project on Super Market Billing
Computer science class 12 project on Super Market BillingComputer science class 12 project on Super Market Billing
Computer science class 12 project on Super Market Billing
 
Supermarket
SupermarketSupermarket
Supermarket
 
Library Management System in c++
Library Management System in c++Library Management System in c++
Library Management System in c++
 
computer science c++ project class xii
computer science c++ project class xiicomputer science c++ project class xii
computer science c++ project class xii
 
Project report1
Project report1Project report1
Project report1
 
computer project on shopping mall..cbse 2017-2018 project
computer project on shopping mall..cbse 2017-2018 projectcomputer project on shopping mall..cbse 2017-2018 project
computer project on shopping mall..cbse 2017-2018 project
 
MySQL 8.0.18 - New Features Summary
MySQL 8.0.18 - New Features SummaryMySQL 8.0.18 - New Features Summary
MySQL 8.0.18 - New Features Summary
 
Canteen management
Canteen managementCanteen management
Canteen management
 
Instruction1. Please read the two articles. (Kincheloe part 1 &.docx
Instruction1. Please read the two articles. (Kincheloe part 1 &.docxInstruction1. Please read the two articles. (Kincheloe part 1 &.docx
Instruction1. Please read the two articles. (Kincheloe part 1 &.docx
 
BSA 376 Enhance teaching - snaptutorial.com
BSA 376 Enhance teaching - snaptutorial.comBSA 376 Enhance teaching - snaptutorial.com
BSA 376 Enhance teaching - snaptutorial.com
 
SAP WEBDYNPRO ABAP ONLINE TRAINING
SAP WEBDYNPRO ABAP ONLINE TRAININGSAP WEBDYNPRO ABAP ONLINE TRAINING
SAP WEBDYNPRO ABAP ONLINE TRAINING
 
SAP WEBDYNPRO ABAP ONLINE TRAINING
SAP WEBDYNPRO ABAP ONLINE TRAININGSAP WEBDYNPRO ABAP ONLINE TRAINING
SAP WEBDYNPRO ABAP ONLINE TRAINING
 
Web dynpro abap
Web dynpro abapWeb dynpro abap
Web dynpro abap
 
SAP WEBDYNPRO ABAP ONLINE TRAINING
SAP WEBDYNPRO ABAP ONLINE TRAININGSAP WEBDYNPRO ABAP ONLINE TRAINING
SAP WEBDYNPRO ABAP ONLINE TRAINING
 
Training WEBDYNPRO ABAP Online SAP Course
Training WEBDYNPRO ABAP Online SAP CourseTraining WEBDYNPRO ABAP Online SAP Course
Training WEBDYNPRO ABAP Online SAP Course
 
Web dynpro abap
Web dynpro abapWeb dynpro abap
Web dynpro abap
 
SAP WEBDYNPRO ABAP COURSE ONLINE TRAINING
SAP WEBDYNPRO ABAP COURSE ONLINE TRAININGSAP WEBDYNPRO ABAP COURSE ONLINE TRAINING
SAP WEBDYNPRO ABAP COURSE ONLINE TRAINING
 

Recently uploaded

Painted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaPainted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaVirag Sontakke
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
Class 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdfClass 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdfakmcokerachita
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
Pharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfPharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfMahmoud M. Sallam
 
internship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerinternship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerunnathinaik
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsKarinaGenton
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsanshu789521
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17Celine George
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
Final demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxFinal demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxAvyJaneVismanos
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxOH TEIK BIN
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
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).pdfSoniaTolstoy
 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting DataJhengPantaleon
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 

Recently uploaded (20)

Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
Painted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaPainted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of India
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
9953330565 Low Rate Call Girls In Rohini Delhi NCR
9953330565 Low Rate Call Girls In Rohini  Delhi NCR9953330565 Low Rate Call Girls In Rohini  Delhi NCR
9953330565 Low Rate Call Girls In Rohini Delhi NCR
 
Class 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdfClass 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdf
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
Pharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfPharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdf
 
internship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerinternship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developer
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its Characteristics
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha elections
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Final demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxFinal demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptx
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
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
 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
 

PLAYER PROFILE MANAGEMENT COMPUTER SCIENCE

  • 1. 1 RMK SENIOR SECONDARY SCHOOL THIRUVERKADU, CHENNAI-77 (Affiliated to the Central Board of Secondary Education ,Delhi) RSM Nagar, sundracholapuram Road Thiruverkadu Chennai-600 077 Website: rmkschool.in ROLL NO: ALL INDIA SENIOR SCHOOLCERTIFICATE EXAMINATION Academic year: 2017-2018 DEPARTMENT OF COMPUTER SCIENCE
  • 2. 2 RMK SENIOR SECONDARY SCHOOL THIRUVERKADU, CHENNAI-77 DEPARTMENT OF COMPUTER SCIENCE This is to certify that ....................................................ofclass ...........has performed ................................during theyear 2017-2018 atthe school laboratory and thathis/her project report is certified as bonafide.His/Her examination roll no is................. ..................................... Head of Department Date................... Computer science Submitted for the All-India Senior SecondarySchool Certificate Examination- 2018 (PracticalExamination)in ComputerScience at RMK SENIOR SECONDARYSCHOOLOn.................................... ........................................ ...................................................... Internal Examiner External Examiner Date.............................. Date............................................... Signature of Principal …….............................
  • 4. 4 ACKNOWLEDGEMENT I hereby acknowledge all those people, who have helped for the successful completion of my project to a great extend. I would also like to convey a special thanks to our principal Mrs.Indira Rangan and the school management for having provided me with complete access to all materials and information sources available in the laboratory. I express my deepest gratitude to our computer teacher Smt.L.Ramadevi for her untiring help and encouragement during the course of the project titled “PLAYER PROFILE MANAGEMENT “. I would also like to extend my thanks to other members of the computer department for their co-operation.
  • 5. 5 INDEX SNO TITLE PAGE NO 1 INTRODUCTION 6 2 ALGORITHM 7 3 SOURCE CODE 10 4 SCREEN SHOTS 20 5 BIBLOGRAPHY 26
  • 6. 6 INTRODUCTION In this PLAYER PROFILE MANAGEMENT SYSTEM project you can manage a Profile of a cricketer’s career. You can Create a new profile, Display a player profile, Modify profile of the player and delete an existing player profile. Jersey number of a player is Fixed. You can also calculate the Average, Strike rate of a player in Batting section. Bowling Average, Economy and Strike rate of each player in Bowling section.
  • 7. 7 ALGORITHM Class name : player Data members : pname, department, age, jno, matches, runs, inn, outs, bavg, nballs, economy, sr, avg, overs, wickets, bruns, bsr. Member functions: cprofile(), showprofile(), getjno(), modifypro(), caverage() , cstrikerate(), ceconomy(), bowlingsr(), baverage(). Object used :p1 -------------------------------------------------------------- Function Name : cprofile() Parameters passed : nil Return type :nil To add a player profile. -------------------------------------------------------------- Function name : showprofile() Parameters passed :nil Return type :nil To display the profile of a added player. -------------------------------------------------------------- Function name : getjno() Parameters passed : nil Return type : int To return Jersey number. -------------------------------------------------------------- Function name : modifypro() Parameters passed : char *ch Return type : nil To modify profile details of a player.
  • 8. 8 Function name : caverage() Parameters passed : nil Return type : nil To calculate the batting average of the player. -------------------------------------------------------------- Function name : cstrikerate() Parameters passed : nil Return type : nil To calculate the batting strikerate of the player. -------------------------------------------------------------- Function name : ceconomy() Parameters passed : nil Return type : nil To calculate the bowling economy of a player. -------------------------------------------------------------- Function name : bowlingsr() Parameters passed : nil Return type : nil To calculate the bowling strike rate of a player. -------------------------------------------------------------- Function name : baverage() Parameters passed : nil Return type : nil To calculate the bowling average of a player. -------------------------------------------------------------- Function name : writeprofile() Parameters passed : nil Return type : nil To write player data into the file . -------------------------------------------------------------- Function name : specidisplay() Parameters passed : nil
  • 9. 9 Return type : nil To display the player profile from the file. Function name : modifyprofile() Parameters passed : nil Return type : nil To modify a player profile. -------------------------------------------------------------- Function name : deleteprofile() Parameters passed : nil Return type : nil To delete a player profile from the file. -------------------------------------------------------------- Function name : intro() Parameters passed : nil Return type : nil -------------------------------------------------------------- Function name : menu() Parameters passed : nil Return type : nil To display the choices offered. -------------------------------------------------------------- Function name : main() Parameters passed : nil Return type : nil Main module. --------------------------------------------------------------
  • 11. 11 //*************************************************************** // HEADER FILE USED IN PROJECT //**************************************************************** #include<process.h> #include<fstream.h> #include<ctype.h> #include<iomanip.h> #include<conio.h> #include<stdio.h> #include<string.h> #include<math.h> //*************************************************************** // CLASS USED IN PROJECT //**************************************************************** class player { char pname[30]; char department[30]; int age; int jno; double matches; double runs; double inn; double outs,bavg; double nballs; double economy,sr,avg,overs; double wickets,bruns; double bsr; public: void cprofile() { cout<<"__________________________________________________"; cout<<"n ENTER NAME OF PLAYER:"; gets(pname); cout<<"n ENTER DEPARTMENT:"; gets(department); cout<<"n Enter jersey number:"; cin>>jno; cout<<"n ENTER AGE OF PLAYER:"; cin>>age; cout<<"n Enter no of matches:"; cin>>matches;
  • 12. 12 cout<<"n ENTER NO OF RUNS SCORED:"; cin>>runs; cout<<"n ENTER NO OF INNINGS:"; cin>>inn; cout<<"n ENTER NO OF TIMES PLAYER GOT OUT:"; cin>>outs; cout<<"n Enter no of balls faced:"; cin>>nballs; cout<<"n ENter no of overs bowled by bowler:"; cin>>overs; cout<<"n Enter wickets taken by player:"; cin>>wickets; cout<<"n Runs left by player:"; cin>>bruns; cout<<"______________________________________________________"; } void showprofile() { cout<<"_____________________________________________________"; cout<<"n NAME OF PLAYER:"; puts(pname); cout<<"n DEPARTMENT:"; puts(department); cout<<"n JERSEY NUMBER OF PLAYER:"; cout<<jno; cout<<"n AGE OF PLAYER:"; cout<<age; cout<<"n no of matches:"; cout<<matches; cout<<"n NO OF RUNS SCORED:"; cout<<runs; cout<<"n NO OF INNINGS:"; cout<<inn; cout<<"n NO OF TIMES PLAYER GOT OUT:"; cout<<outs; cout<<"n NO of balls faced:"; cout<<nballs; cout<<"n no of overs bowled by bowler:"; cout<<overs; cout<<"n wickets taken by player:"; cout<<wickets; cout<<"n Runs left by player:"; cout<<bruns;
  • 13. 13 cout<<"n__________________________________________________"; } int getjno() { return jno; } void modifypro(char *ch) { cout<<"__________________________________________________"; if(strcmpi(ch,"name")==0) { cout<<"n ENTER NAME OF PLAYER:"; gets(pname); } else if(strcmpi(ch,"department")==0) { cout<<"n ENTER DEPARTMENT:"; gets(department); } else if(strcmpi(ch,"age")==0) { cout<<"n ENTER AGE OF PLAYER:"; cin>>age; } else if(strcmpi(ch,"matches")==0) { cout<<"n ENter no of matches:"; cin>>matches; } else if(strcmpi(ch,"runs")==0) { cout<<"n ENTER NO OF RUNS SCORED:"; cin>>runs; } else if(strcmpi(ch,"innings")==0) { cout<<"n ENTER NO OF INNINGS:"; cin>>inn; } else if(strcmpi(ch,"out")==0) { cout<<"n ENTER NO OF TIMES PLAYER GOT OUT:"; cin>>outs; }
  • 14. 14 else if(strcmpi(ch,"balls")==0) { cout<<"n Enter no of balls faced:"; cin>>nballs; } else if(strcmpi(ch,"over")==0) { cout<<"n ENter no of overs bowled by bowler:"; cin>>overs; } else if(strcmpi(ch,"wickets")==0) { cout<<"n Enter wickets taken by player:"; cin>>wickets; } else { cout<<"n Runs left by player:"; cin>>bruns; } } void caverage() { avg=(runs)/outs; cout<<"n Average of player:"<<avg; } void cstrikerate() { sr=(runs*100)/nballs; cout<<"n STRIKE RATE OF THE PLAYER:"<<sr; } void ceconomy() { economy=bruns/overs; cout<<"n ECONOMY OF THE PLAYER:"<<economy; } void bowlingsr() { bsr=(overs*6)/wickets; cout<<"n Bowling strike rate of player:"<<bsr; } void baverage()
  • 15. 15 { bavg=bruns/wickets; cout<<"n BOWLING AVERAGE OF THE PLAYER:"<<bavg; } }; //*************************************************************** // global declaration for object //*************************************************************** player p1; //*************************************************************** // function to write in file //*************************************************************** void writeprofile() {clrscr(); ofstream fout("player1.dat",ios::binary|ios::app); p1.cprofile(); fout.write((char*)&p1,sizeof(p1)); fout.close(); } //*************************************************************** // function to read specific record from file //*************************************************************** void specidisplay() { player p1; int found=0,n; ifstream fin("player1.dat",ios::in); cout<<"n ENTER JERSEY NUMBER OF THE PLAYER: ";cin>>n; while(fin.read((char*)&p1,sizeof(p1))) { if(p1.getjno()==n) { clrscr(); p1.showprofile(); p1.caverage(); p1.cstrikerate(); p1.ceconomy(); p1.bowlingsr(); p1.baverage(); found=1; } }
  • 16. 16 if(found==0) { cout<<"n PLAYER DOES NOT EXIST:"; } } //*************************************************************** // function to modify record of file //*************************************************************** void modifyprofile() { clrscr(); char *ch; int n,temp=0; cout<<"n ENTER THE PLAYER JERSEY NUMBER:";cin>>n; ifstream fin("player1.dat",ios::binary|ios::in); ofstream fout("playertemp.dat",ios::binary|ios::app); while(fin.read((char*)&p1,sizeof(p1))) { if(p1.getjno()==n) { cout<<"n ENTER THE AREA TO BE CHANGED:"; gets(ch); cout<<"n ENTER NEW DETAILS:"; p1.modifypro(ch); fout.write((char*)&p1,sizeof(p1)); cout<<"n RECORD MODIFIED!!!!!!"; temp=1; } else { fout.write((char*)&p1,sizeof(p1)); } } fin.close(); fout.close(); remove("player1.dat"); rename("playertemp.dat","player1.dat"); if(temp==0) cout<<"n NO RECORDS ARE CREATED"; }
  • 17. 17 //*************************************************************** // function to delete record of file //*************************************************************** void deleteprofile() { clrscr(); ifstream fin("player1.dat",ios::binary|ios::in); ofstream fout("playertemp.dat",ios::binary|ios::app); int n,temp=0; cout<<"n ENTER JERSEY NO OF THE PLAYER:";cin>>n; while(fin.read((char*)&p1,sizeof(p1))) { if(p1.getjno()==n) { cout<<"n RECORD DELETED!!!"; temp=1; } else { fout.write((char*)&p1,sizeof(p1)); } } fin.close(); fout.close(); remove("player1.dat"); rename("playertemp.dat","player1.dat"); if(temp==0) cout<<"n NO RECORDS ARE CREATED!!!!!!!!!!!!!!!"; } //*************************************************************** // INTRODUCTION FUNCTION //*************************************************************** void intro() { cout<<"n PLAYER PROFILE MANAGEMENT SYSTEM"; cout<<"nn MADE BY:"; cout<<"n n PRADEEP.K.V"; cout<<"n T.JEGADEESHWARAN"; getch(); }
  • 18. 18 //*************************************************************** // MENU FUNCTION //*************************************************************** void menu() { char ch,c='y'; int n; clrscr(); intro(); do { clrscr(); cout<<"n MAIN MENU:"; cout<<"n 1.CREATE NEW PROFILE:"; cout<<"n 2.DISPLAY PROFILE OF CERTAIN PLAYER:"; cout<<"n 3.MODIFY ALL PLAYER PROFILES:"; cout<<"n 4.CLOSE A PLAYER PROFILE:"; cout<<"n 5.EXIT:"; cout<<"n SELECT YOUR OPTION(1-5):"; cin>>ch; clrscr(); switch(ch) { case '1':writeprofile() ; break; case '2':specidisplay(); break; case '3':modifyprofile(); break; case '4':deleteprofile(); break; case '5':exit(0); default:cout<<"n******************************************"; } cout<<"n DO YOU WANT TO CONTINUE:"; cin>>c; }while((c=='y')||(c=='Y')); }
  • 19. 19 //*************************************************************** // MAIN FUNCTION OF THE PROGRAM //*************************************************************** void main() { textbackground(BLACK); textcolor(WHITE); clrscr(); menu(); getch(); }
  • 21. 21
  • 22. 22
  • 23. 23
  • 24. 24
  • 25. 25
  • 26. 26 BIBLIOGRAPHY: 1) Together with C++ - SUMITA ARORA. 2) TURBO C++ help.