Download as pdf or txt
Download as pdf or txt
You are on page 1of 19

GRP.NO.

13

Pimpri Chinchwad Education Trust’s CO-R-46


Pimpri Chinchwad Polytechnic
Date :
Computer Department Revision :
01/06/23
(NBA Accredited and ISO 9001:2015 Certified 00
Department) Academic Year: 2023-24
Page : 01/14

MICRO-PROJECT REPORT PART -A &


PART –B

Name of Program:- Diploma in Computer Engineering

Semester:- 5th Semester

Name of Course and Code:- Advance Java Programming (22517)

Title of the Micro-Project:- Tic-Tac-Toe game in Java.

Name of Team Members:- 01. Pratik Kapse

06. Heramb Abhyankar

41. Snehal Jadhav

49. Sahil Kalaskar

Name of the Project Guide:- Mrs. Gayatri Mujumdar

Department of Computer Engineering Page 1


GRP.NO. 13

Maharashtra State
Board of Technical Education, Mumbai
(Autonomous) (ISO-9001-2015) (ISO/IEC 27001:2013)

CERTIFICATE

This is to certify that: - Sahil Kalaskar, Snehal Jadhav, Heramb Abhyankar,


Pratik Kapse students of Diploma in Computer Engineering of Pimpri Chinchwad
Polytechnic (Code: 0056) have completed Micro projects of the course Advance Java
Programming (22517) as prescribed in the curriculum for the academic year 2023 to
2024.

Place: Nigdi, Pune-44 Date: 01/06/23

Course Incharge Head of Department


Mrs. Gayatri Mujumdar Prof. M. S. Malkar

Seal of Institute

Department of Computer Engineering Page 2


GRP.NO. 13

PART- A of Micro Project (Proposal)

Title: - Tic-Tac-Toe game in Java.

1.0 AIM/BENEFITS OF MICRO-PROJECT:-

Implementing a Tic-tac-toe game in advanced Java offers several significant


aims and benefits. First, it provides an opportunity to dive deeper into advanced
Java concepts and technologies, enhancing your expertise in the language. You
can leverage features like multithreading, JavaFX for a modern graphical user
interface, and database integration to store game statistics and user profiles.
Additionally, building a Tic-tac-toe game in advanced Java allows you to
explore advanced design patterns and software architecture principles. You can
apply design patterns like MVC (Model-View-Controller) to separate the game's
logic, interface, and data, promoting code modularity and maintainability.

2.0 INTENDED COURSE OUTCOMES:-

 Developing the logic for win conditions, game rules, and user
interactions requires critical problem-solving skills.
 The project can help students apply advanced Java concepts such as
multithreading, networking, JavaFX, or Swing for creating graphical
user interfaces, depending on the chosen technology stack.
 The project provides opportunities to deal with exceptions and errors,
such as handling invalid user input or network-related issues if
multiplayer functionality is implemented.
 If the project includes features like real-time multiplayer gameplay,
students can learn about multithreading to handle concurrent operations
efficiently.
 Planning and managing the development of a complete game project can
help students gain project management skills, including task scheduling,
version control, and documentation.
 Use data structures effectively.
 Develop graphical user interfaces (GUIs) in Java.

Department of Computer Engineering Page 3


GRP.NO. 13

3.0 PROPOSED METHODOLOGY:-

1. Project Planning and Design: In the initial phase, a comprehensive design plan
should be created. This involves defining the game's requirements, user interface
(UI) design, and the architecture of the software. You'll need to decide whether you
want a graphical user interface (GUI) or a text-based interface. Advanced Java
frameworks like JavaFX can be employed for GUI development. The game's
structure should be object-oriented, with classes for the game board, players, and
any AI components. Additionally, you should plan for user input handling,
including mouse or keyboard interactions, and establish the rules of the game. This
phase also includes choosing an appropriate data structure to represent the game
board (e.g., a 2D array) and designing algorithms for checking win conditions and
enforcing game rules.

2. Implementation and Testing: With the design in place, you can proceed to the
implementation phase. In advanced Java, you'll use features like event-driven
programming to handle user actions in a GUI or console-based input/output for
text-based versions. You'll create classes and methods for initializing the game,
managing player turns, handling AI logic if applicable, and updating the game
board. It's essential to thoroughly test each component as you develop to catch and
rectify bugs and issues early. Additionally, implementing features like multiplayer
mode or advanced AI algorithms (e.g., minimax with alpha-beta pruning) can be
considered for an enhanced experience. Finally, rigorous testing should be
performed to ensure the game functions as expected, and edge cases are handled
appropriately. Once fully tested and debugged, the game can be considered
complete and ready for deployment or further enhancements.

Department of Computer Engineering Page 4


GRP.NO. 13

4.0 RESOURCES USED:-

SR. NAME OF SPECIFICATION QTY REMARKS


NO. RESOURCES/
MATERIAL

1. Operating System 1 Used


Microsoft Windows
2. Visual Studio code Version 5.2.2 1 Used

3. Eclipse Version 4.24 1 Used

4. Search Engine Chrome 1 Used

5.0 Action Plan:-

Name of the program: - Computer engineering


Computer semester: - 5th
Course title: - Advance Java Programming (22517)
Title of the micro project: - Tic-Tac-Toe game in Java.

Department of Computer Engineering Page 5


GRP.NO. 13

Planned Planned Name of Responsible


Sr.No. Details of activity start date finished date Team Members

Topics given by subject


27/7/2023 3/8/2023
teacher and discussed on
1 All Members
given topic with all
members.
Collection of information Sahil Kalaskar
2 3/8/2023 10/8/2023
related to topic

3 10/8/2023 17/8/2023 Heramb Abhyankar


Planning of project

Analyses the collected data


4 and finalize structure of 17/8/2023 24/8/2023 Pratik Kapse
project.

WEEK 4: Submission of Proposal

Distribution of tasks and


5 discussion of roles and 24/8/2023 31/8/2023 Snehal Jadhav
responsibilities of each
member

6 Design of project 31/8/2023 7/9/2023 Sahil Kalaskar

7 Implementation 7/9/2023 14/9/2023 All Members

Department of Computer Engineering Page 6


GRP.NO. 13

6.0 LIST OF TEAM MEMBERS:-

Enrollment No. Roll No. Names

2100560351 01 Pratik Kapse

2100560054 06 Heramb
Abhyankar

2100560096 41 Snehal Jadhav

2100560107 49 Sahil Kalaskar

Department of Computer Engineering Page 7


GRP.NO. 13

PART- B of Micro Project ( Report )

Title: - Tic-Tac-Toe game in Java.

1.0 RATIONALE:-

Implementing a Tic-tac-toe game in advanced Java serves as a


comprehensive exercise to demonstrate proficiency in advanced
programming concepts. The project involves leveraging advanced Java
features such as multi-threading for simultaneous user interactions,
graphical user interfaces (GUI) for an enhanced user experience, and
networking capabilities to enable multiplayer functionality. Additionally,
integrating artificial intelligence algorithms, like minimax, for an intelligent
computer opponent highlights proficiency in algorithmic thinking and game
development. This project not only reinforces fundamental Java skills but
also showcases the ability to apply advanced techniques to create a
sophisticated and engaging game application.

2.0 AIM/BENEFITS OF MICRO-PROJECT:-

 Implementing a Tic-tac-toe game in advanced Java offers several significant


aims and benefits. First, it provides an opportunity to dive deeper into advanced
Java concepts and technologies, enhancing your expertise in the language. You
can leverage features like multithreading, JavaFX for a modern graphical user
interface, and database integration to store game statistics and user profiles.
 Additionally, building a Tic-tac-toe game in advanced Java allows you to explore
advanced design patterns and software architecture principles. You can apply
design patterns like MVC (Model-View-Controller) to separate the game's logic,
interface, and data, promoting code modularity and maintainability.

Department of Computer Engineering Page 8


GRP.NO. 13

3.0 INTENDED COURSE OUTCOMES:-

 Developing the logic for win conditions, game rules, and user interactions
requires critical problem-solving skills.
 The project can help students apply advanced Java concepts such as
multithreading, networking, JavaFX, or Swing for creating graphical user
interfaces, depending on the chosen technology stack.
 The project provides opportunities to deal with exceptions and errors, such
as handling invalid user input or network-related issues if multiplayer
functionality is implemented.
 If the project includes features like real-time multiplayer gameplay, students
can learn about multithreading to handle concurrent operations efficiently.
 Planning and managing the development of a complete game project can
help students gain project management skills, including task scheduling,
version control, and documentation.
 Use data structures effectively.
 Develop graphical user interfaces (GUIs) in Java.

Department of Computer Engineering Page 9


GRP.NO. 13

4.0 LITERATURE REVIEW:-

The implementation of a Tic-tac-toe game in advanced Java represents a practical


application of sophisticated programming concepts. Leveraging the capabilities of
advanced Java features, this project delves into the realms of multithreading, graphical
user interfaces (GUIs), and networking if extended to a multiplayer version.
Incorporating advanced data structures and algorithms for game logic, such as
optimizing the minimax algorithm for an AI opponent, demonstrates a deep
understanding of algorithmic complexity and optimization techniques. The use of Java's
advanced libraries and frameworks for GUI development provides a polished and user-
friendly interface. Additionally, advanced error handling, exception management, and
robust input validation contribute to the overall reliability and stability of the
application. Overall, this literature review underscores how the Tic-tac-toe project in
advanced Java not only serves as a platform for applying advanced programming
concepts but also showcases a mastery of Java's capabilities, making it a well-rounded
and sophisticated endeavor.

5.0 ACTUAL RESOURCES USED:-

SR. NAME OF SPECIFICATION QTY REMARKS


NO. RESOURCES/
MATERIAL

1. Operating System 1 Used


Microsoft Windows
2. Visual Studio code Version 5.2.2 1 Used

3. Eclipse Version 4.24 1 Used

4. Search Engine Chrome 1 Used

Department of Computer Engineering Page 10


GRP.NO. 13

6.0 ACTUAL METHODOLOGY FOLLOWED:-

• Collect relevant data from different resources (books/internet/experts).


• Distribution of work among our team members.
• After completing individual work combine it in best way for presentation.
• Submit the Micro-project on the given date.

Name of Responsible
Sr. No Details of activity Team Members

Topics given by subject teacher and


discussed ongiven topic with all All Members
1 members.

2 Collection of information related to topic Heramb Abhyankar

3 Planning of project All Members

Analyses the collected data and finalize Pratik Kapse


4 structureof project.

Distribution of tasks anddiscussion of


roles and responsibilities of each Snehal Jadhav
5 member

6 Design of project Sahil Kalaskar

7 Implementation All Members

Department of Computer Engineering Page 11


GRP.NO. 13

7.0 OUTPUT OF MICROPROJECT:-

Department of Computer Engineering Page 12


GRP.NO. 13

 SOURCE CODE:-
// A simple program to demonstrate
// Tic-Tac-Toe Game.
import java.util.*;

public class GFG {

static String[] board;


static String turn;

// CheckWinner method will


// decide the combination
// of three box given below.
static String checkWinner()
{
for (int a = 0; a < 8; a++) {
String line = null;

switch (a) {
case 0:
line = board[0] + board[1] + board[2];
break;
case 1:
line = board[3] + board[4] + board[5];
break;
case 2:
line = board[6] + board[7] + board[8];
break;
case 3:
line = board[0] + board[3] + board[6];
break;
case 4:
line = board[1] + board[4] + board[7];
break;
case 5:
line = board[2] + board[5] + board[8];
break;
case 6:
line = board[0] + board[4] + board[8];
break;
case 7:
line = board[2] + board[4] + board[6];
break;
}

Department of Computer Engineering Page 13


GRP.NO. 13
//For X winner
if (line.equals("XXX"))
{
return "X";
}

// For O winner
else if (line.equals("OOO")) {
return "O";
}
}

for (int a = 0; a < 9; a++) {


if (Arrays.asList(board).contains(
String.valueOf(a + 1))) {
break;
}
else if (a == 8) {
return "draw";
}
}

// To enter the X Or O at the exact place on board.


System.out.println(
turn + "'s turn; enter a slot number to place "
+ turn + " in:");
return null;
}

// To print out the board.


/* |---|---|---|
|1|2|3|
|-----------|
|4|5|6|
|-----------|
|7|8|9|
|---|---|---|*/

static void printBoard()


{
System.out.println("|---|---|---|");
System.out.println("| " + board[0] + " | "+ board[1] + " | " + board[2]+ " |");
System.out.println("|-----------|");
System.out.println("| " + board[3] + " | "+ board[4] + " | " + board[5]+ " |");
System.out.println("|-----------|");
System.out.println("| " + board[6] + " | "+ board[7] + " | " + board[8]+ " |");
System.out.println("|---|---|---|");
}

Department of Computer Engineering Page 14


GRP.NO. 13
public static void main(String[] args)
{
Scanner in = new Scanner(System.in);
board = new String[9];
turn = "X";
String winner = null;

for (int a = 0; a < 9; a++) {


board[a] = String.valueOf(a + 1);
}

System.out.println("Welcome to 3x3 Tic Tac Toe.");


printBoard();

System.out.println(
"X will play first. Enter a slot number to place X in:");

while (winner == null) {


int numInput;

// Exception handling.
// numInput will take input from user like from 1 to 9.
// If it is not in range from 1 to 9.
// then it will show you an error "Invalid input."
try {
numInput = in.nextInt();
if (!(numInput > 0 && numInput <= 9)) {
System.out.println(
"Invalid input; re-enter slot number:");
continue;
}
}
catch (InputMismatchException e) {
System.out.println(
"Invalid input; re-enter slot number:");
continue;
}

// This game has two player x and O.


// Here is the logic to decide the turn.
if (board[numInput - 1].equals(
String.valueOf(numInput))) {
board[numInput - 1] = turn;

if (turn.equals("X")) {
turn = "O";
}

Department of Computer Engineering Page 15


GRP.NO. 13

else {
turn = "X";
}

printBoard();
winner = checkWinner();
}
else {
System.out.println("Slot already taken; re-enter slot number:");
}
}

// If no one win or lose from both player x and O.


// then here is the logic to print "draw".
if (winner.equalsIgnoreCase("draw")) {
System.out.println(
"It's a draw! Thanks for playing.");
}

// For winner -to display Congratulations! message.


else {
System.out.println(
"Congratulations! " + winner
+ "'s have won! Thanks for playing.");
}
in.close();
}
}

Department of Computer Engineering Page 16


GRP.NO. 13

8.0 SKILLS DEVELPOED/LEARNING OUTCOME OF THIS MICRO


PROJECT:-

Sr. Yes/No
Technical/Non-Technical Skills
No.

1. To work on computer for long time ✔

2. Project Plans ✔

3. Collecting the Information ✔

4. Analysis of Information ✔

5. Learning skills ✔

6. Time and Task Management ✔

7. Creative Thinking ✔

8. Leadership ✔

9. Team Work ✔

10. Programming Skills ✔

11. Responsibility ✔

12. Thinking Ability ✔

13. Completing the project in the given time ✔

Department of Computer Engineering Page 17


GRP.NO. 13

9.0 ACTION PLAN:-

Planned Planned Name of Responsible


Sr.No. Details of activity start date finished date Team Members

Topics given by subject


teacher and discussed on
1 All Members
given topic with all
members.
Collection of information Sahil Kalaskar
2
related to topic

3 Snehal Jadhav
Planning of project

Analyses the collected data


4 and finalize structure of Heramb Abhyankar
project.

WEEK 4: Submission of Proposal

Distribution of tasks and


5 discussion of roles and Pratik Kapse
responsibilities of each
member

6 Design of project Sahil Kalaskar

7 Implementation All Members

Department of Computer Engineering Page 18


GRP.NO. 13

10.0 APPLICATIONS OF MICRO-PROJECT:-

1. Networked Multiplayer
2. Artificial Intelligence (AI)
3. Database Integration
4. Sound and Animation
5. Accessibility Features
6. Customization Options
7. Tournament Mode
8. Mobile App Integration
9. Social Media Integration
10.Internationalization (i18n) and
Localization (l10n)
11. Data Analytics

Department of Computer Engineering Page 19

You might also like