0% found this document useful (0 votes)
0 views

Java MP

The document is a micro-project report on a Cricket Scoring System developed using Java programming by students of Yadavrao Tasgaonkar Polytechnic. It outlines the rationale, aims, methodology, resources, and skills developed through the project, as well as the final output, which includes source code for the application. The project serves as a practical application of object-oriented programming and data management concepts, and it is evaluated based on various criteria related to its relevance and execution.

Uploaded by

bhatsoham5
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
0 views

Java MP

The document is a micro-project report on a Cricket Scoring System developed using Java programming by students of Yadavrao Tasgaonkar Polytechnic. It outlines the rationale, aims, methodology, resources, and skills developed through the project, as well as the final output, which includes source code for the application. The project serves as a practical application of object-oriented programming and data management concepts, and it is evaluated based on various criteria related to its relevance and execution.

Uploaded by

bhatsoham5
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 20

Yadavrao Tasgaonkar Polytechnic

MicroProject on
Cricket Scoring System

SUBJECT:- JAVA PROGRAMMING(22412)


Yadavrao Tasgaonkar Polytechnic Bhivpuri road

Annexure II
A Micro-Project Report On
“Cricket Scoring System”
Submitted In partial fulfilment of the the
diploma in

Computer Engineering
UNDER GUIDENCE OF MRS. Megha Dhotre
Department of
Computer Engineering

Submitted by:
Name of the Student
Om gaikwad

Rohit Mhatre

Laksh Gavle

Hrushikesh Tarmale

TABLE OF CONTENTS
Sr. No. Topics Page No.
1 Rationale 11
2 Aim / Benefits of Micro-Project. 11
3 Course Outcomes Addressed. 11
4 Literature review 11
5 Actual Methodology followed 12
6 Actual resources used 12
7 Outputs of the Micro-Project 13 to 22
8 Skill Developed through this Project 22
9 Applications of the Micro-Project 23
10 Evaluation Sheet 24 to 27

1.0 RATIONALE:
Java programming provides a powerful, platform independent toolset for building
robust, secure, and scalable applications. It excels in enterprise-level development, web
applications, Android development, and big data processing. Its rich standard library, object
oriented approach, and multi-threading capabilities make it a versatile choice with a wide
range of job opportunities in the industry.

2.0 AIMS/ BENEFITS OF THE MICRO-PROJECT:


The Cricket Scoring System microproject aims to create a simple application that simulates
the scoring process in a cricket match. By developing this project in Java, you can achieve
benefits such as understanding:
1. Object-Oriented Programming (OOP): Concepts like classes, objects, inheritance, and
polymorphism.
2. Data Structures: Usage of arrays, ArrayLists, HashMaps etc.
3. Control Structures: Looping and conditional statements.
4. Exception Handling: Try, catch, and finally blocks.
5. Java Libraries: Usage of built-in Java libraries for tasks like sorting and searching.
6. Comprehensive Source Code Development: Writing clean, readable, and maintainable
code.

3.0 COURSE OUTCOME ADRESSED:


1. We get to know more detailed information about Core Java.
2. To be able to develop programs using Object Oriented methodology in Java.

4.0 LITERATURE REVIEW:


1.Internet (Google chrome).
2.YouTube.
3.Java programming (By Nirali Publication).
4.Group Discussion.

5.0 ACTUAL METHODOLOGY FOLLOWED:


1. We first discussed the topic of our Microproject among the Team members and then
made a timetable.
2. Then distributed the work of gathering information within the group members.
3. We did research on Cricket Scoring System through various sources and articles
gathered the information related to our topic.
4. We also check the authenticity of the information.
5. Then finally started working on our project i.e. Cricket Scoring System
6. Through proper co-ordination among the team members, we rectified the oncoming
errors and corrected the code of our Cricket Scoring System.
7. Afterwards, we made the Report of the Microproject and then we contributed some
money to print a hard copy.
8. To complete the project (from collection of information to making report of
microproject) we took approximately 45 days.

6.0 ACTUAL RESORCES REQUIRED:

SrNo. Name of the Resources Specification Remarks

1. Computer system and mobiles Windows 10 with Basic


configuration

2. MS Word Version 2016

3. Notepad++ Ver. 8.6.4

4. Internet Google Chrome

7.0 OUTPUT OF THE MICRO-PROJECT:


Source Code-
import java.util.Scanner;

class Player {
String name;
int runs;
int wickets;
boolean isOut;

public Player(String name) {


this.name = name;
this.runs = 0;
this.wickets = 0;
this.isOut = false;
}
}

class Team {
String name;
Player[] players;

public Team(String name, Scanner scanner) {


this.name = name;
this.players = new Player[11];
for (int i = 0; i < 11; i++) {
System.out.print("Enter name of Player " + (i + 1) + " in "
+ name + ": ");
String playerName = scanner.next();
this.players[i] = new Player(playerName);
}
}

public int getTotalRuns() {


int totalRuns = 0;
for (Player player : players) {
totalRuns += player.runs;
}
return totalRuns;
}
}

class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);

// Create two teams


System.out.print("Enter name of Team 1: ");
String team1Name = scanner.next();
Team team1 = new Team(team1Name, scanner);

System.out.print("Enter name of Team 2: ");


String team2Name = scanner.next();
Team team2 = new Team(team2Name, scanner);

// Initialize variables
int ballsRemainingTeam1;
int ballsRemainingTeam2;
int totalBalls;
Team currentTeam;

// Prompt user for total balls


System.out.print("Enter the total number of balls: ");
totalBalls = scanner.nextInt();
ballsRemainingTeam1 = totalBalls;
ballsRemainingTeam2 = totalBalls;

// Choose the team to bat first


System.out.println("Select team to bat first:");
System.out.println("1. " + team1.name);
System.out.println("2. " + team2.name);
int selectedTeam = scanner.nextInt();
currentTeam = (selectedTeam == 1) ? team1 : team2;

// Start match
while (ballsRemainingTeam1 > 0 || ballsRemainingTeam2 > 0) {
System.out.println("Enter your choice: ");
System.out.println("1. Add run to player");
System.out.println("2. Add wicket taken by bowler");
System.out.println("3. Print Scorecard");
System.out.println("4. Balls remaining");
System.out.println("5. Second team bats");
System.out.println("6. End Match");
System.out.print("Enter your choice: ");
int choice = scanner.nextInt();

switch (choice) {
case 1:
// Add run to player
System.out.print("Enter player name: ");
String playerName = scanner.next();
System.out.print("Enter runs scored: ");
int runsScored = scanner.nextInt();
addRunToPlayer(currentTeam, playerName,
runsScored);
if (currentTeam == team1) {
ballsRemainingTeam1--;
} else {
ballsRemainingTeam2--;
}
break;
case 2:
// Add wicket taken by bowler
System.out.print("Enter bowler name: ");
String bowlerName = scanner.next();
System.out.print("Enter batsman name: ");
String batsmanName = scanner.next();
addWicketTaken(currentTeam, bowlerName,
batsmanName);
if (currentTeam == team1) {
ballsRemainingTeam1--;
} else {
ballsRemainingTeam2--;
}
break;
case 3:
// Print scorecard
printScorecard(team1);
printScorecard(team2);
break;
case 4:
// Print balls remaining
System.out.println("Team 1 Balls remaining: " +
ballsRemainingTeam1);
System.out.println("Team 2 Balls remaining: " +
ballsRemainingTeam2);
break;
case 5:
// Second team bats
currentTeam = (currentTeam == team1) ? team2 :
team1;
ballsRemainingTeam1 = (currentTeam == team1) ? 0 :
ballsRemainingTeam1;
ballsRemainingTeam2 = (currentTeam == team2) ? 0 :
ballsRemainingTeam2;
break;
case 6:
// End match
ballsRemainingTeam1 = 0;
ballsRemainingTeam2 = 0;
break;
default:
System.out.println("Invalid choice!");
}
}
// Print final scorecard
System.out.println("Final Scorecard:");
printScorecard(team1);
printScorecard(team2);

// Determine the winner


Team winner = determineWinner(team1, team2);

// Print the winner team name


System.out.println("Winner: " + winner.name);

// Close scanner
scanner.close();
}

public static void addRunToPlayer(Team team, String playerName, int


runsScored) {
for (Player player : team.players) {
if (player.name.equals(playerName)) {
player.runs += runsScored;
return;
}
}
System.out.println("Player not found in team.");
}

public static void addWicketTaken(Team team, String bowlerName,


String batsmanName) {
for (Player player : team.players) {
if (player.name.equals(bowlerName)) {
player.wickets++;
break;
}
}
for (Player player : team.players) {
if (player.name.equals(batsmanName)) {
player.isOut = true;
break;
}
}
}

public static void printScorecard(Team team) {


System.out.println("Team: " + team.name);
System.out.println("Player\tRuns\tWickets\tStatus");
for (Player player : team.players) {
System.out.print(player.name + "\t" + player.runs + "\t" +
player.wickets);
if (player.isOut) {
System.out.println("\tOut");
} else {
System.out.println("\tNot Out");
}
}
System.out.println();
}

public static Team determineWinner(Team team1, Team team2) {


if (team1.getTotalRuns() > team2.getTotalRuns()) {
return team1;
} else {
return team2;
}
}
}

Output-
8.0 SKILLS DEVELOPED/LEARNING OUTCOME OF THIS
MICROPROJECT:
1. Critical Thinking: The project enhances the ability to analyze and evaluate complex
cricket match scenarios to ensure accurate scoring.
2. Data Management: It develops skills in managing and organizing cricket match data
effectively.
3. Decision Making: Every aspect of the scoring system involves making decisions to
correctly apply cricket rules.
4. Concentration: Requires continuous focus on the match to update scores and player
statistics promptly.
5. Memory Skills: Improves the ability to remember player performances and match details
for scoring accuracy.
6. Teamwork: Encourages collaborative efforts in developing and maintaining the scoring
system.
7. Resilience: Teaches the importance of overcoming challenges and errors during the
development process.
8. Strategic Thinking: Fosters an interest in creating strategic solutions for real-world
applications like cricket scoring.
9.0 APPLICATION OF THESE MICRO-PROJECT:
1. Education: Teaches Java and cricket rules.
2. Teaching Programming: Demonstrates core Java concepts.
3. AI and Machine Learning: Trains models for match predictions.
4. Psychological Studies: Analyzes player performance under pressure.
5. Client Review: Showcases proof of concept for clients.
6. Entertainment and Mobile Apps: Extends to mobile apps for live scores.
7. Board Games and Puzzles: Adapts for cricket-based board games.
8. Assistive Technology: Helps visually impaired individuals follow the game.
9. Decision-Making and Conflict Resolution: Assists umpires in decision-making.
10. Therapeutic Interventions: Adds competition to therapeutic cricket games.
Annexure IV
Evaluation Sheet for the Micro Project
NAME OF STUDENT: Tanishq Gurunath Pote.
ROLL NO: 60.
NAME OF PROGRAMME: Computer Engineering. SEMESTER: FOURTH.
COURSE TITLE: Java Programming (JPR).
COURSE CODE: 22412
TITLE OF THE MICRO PROJECT: Cricket Scoring System.
COURSE OUTCOMES ACHIEVED:
1. We get to know more detailed information about Core Java.
2. To be able to develop programs using Object Oriented methodology in Java.

Sr. Characteristic to be Poor Average Good Excellent Sub Total


assessed (Marks 1- (Marks 4- (Marks 6- (Marks 9-
No
3) 5) 8) 10)

(A) Process and Product Assessment (convert above total marks out of 6 Marks)

1 Relevance to the
course
2 Literature
Review/information
collection

3 Completion of the
Target as per project
proposal

4 Analysis of Data and


representation
5 Quality of
Prototype/Model
6 Report Preparation
(B) Individual Presentation/Viva (convert above total marks out of 4 Marks)
7 Presentation
8 Viva

Comments/Suggestions about team work/leadership(if any):


Name and designation of the faculty member:
Signature:
Evaluation Sheet for the Micro Project
NAME OF STUDENT: Soham Shrikant Sonar.
ROLL NO: 61.
NAME OF PROGRAMME: Computer Engineering. SEMESTER: FOURTH.
COURSE TITLE: Java Programming (JPR).
COURSE CODE: 22412.
TITLE OF THE MICRO PROJECT: Cricket Scoring System.
COURSE OUTCOMES ACHIEVED:
3. We get to know more detailed information about Core Java.
4. To be able to develop programs using Object Oriented methodology in Java.

Sr. Characteristic to be Poor Average Good Excellent Sub Total


assessed (Marks (Marks 4- (Marks 6- (Marks 9-
No
1-3) 5) 8) 10)

(A) Process and Product Assessment (convert above total marks out of 6 Marks)

1 Relevance to the
course
2 Literature
Review/information
collection

3 Completion of the
Target as per project
proposal

4 Analysis of Data and


representation
5 Quality of
Prototype/Model
6 Report Preparation
(B) Individual Presentation/Viva (convert above total marks out of 4 Marks)
7 Presentation
8 Viva

Comments/Suggestions about team work/leadership(if any):


Name and designation of the faculty member:
Signature:
Evaluation Sheet for the Micro Project
NAME OF STUDENT: Ayaan Shaikh.
ROLL NO: 66.
NAME OF PROGRAMME: Computer Engineering. SEMESTER: FOURTH.
COURSE TITLE: Java Programming (JPR).
COURSE CODE: 22412.
TITLE OF THE MICRO PROJECT: Cricket Scoring System.
COURSE OUTCOMES ACHIEVED:
1. We get to know more detailed information about Core Java.
2. To be able to develop programs using Object Oriented methodology in Java.

Sr. Characteristic to be Poor Average Good Excellent Sub Total


assessed (Marks 1- (Marks 4- (Marks 6- (Marks 9-
No
3) 5) 8) 10)

(A) Process and Product Assessment (convert above total marks out of 6 Marks)

1 Relevance to the
course
2 Literature
Review/information
collection

3 Completion of the
Target as per project
proposal

4 Analysis of Data and


representation
5 Quality of
Prototype/Model
6 Report Preparation
(B) Individual Presentation/Viva (convert above total marks out of 4 Marks)
7 Presentation
8 Viva

Comments/Suggestions about team work/leadership(if any):

Name and designation of the faculty member:

Signature:
Evaluation Sheet for the Micro Project
NAME OF STUDENT: Sham Gulab Pawar.
ROLL NO: 69.
NAME OF PROGRAMME: Computer Engineering. SEMESTER:FOURTH.
COURSE TITLE: Java Programming (JPR).
COURSE CODE: 22412
TITLE OF THE MICRO PROJECT: Cricket Scoring System.
COURSE OUTCOMES ACHIEVED:
1. We get to know more detailed information about Core Java.
2. To be able to develop programs using Object Oriented methodology in Java.

Sr. Characteristic to be Poor Average Good Excellent Sub Total


assessed (Marks (Marks 4- (Marks 6- (Marks 9-
No
1-3) 5) 8) 10)

(A) Process and Product Assessment (convert above total marks out of 6 Marks)

1 Relevance to the
course
2 Literature
Review/information
collection

3 Completion of the
Target as per project
proposal

4 Analysis of Data and


representation
5 Quality of
Prototype/Model
6 Report Preparation
(B) Individual Presentation/Viva (convert above total marks out of 4 Marks)
7 Presentation
8 Viva

Comments/Suggestions about team work/leadership(if any):


Name and designation of the faculty member:
Signature:

You might also like