Oop Microproject 1
Oop Microproject 1
2024 - 2025
Affiliated to
MAHARASHTRA STATE BOARD OF TECHNICAL
EDUCATION
Submitted in partial fulfilment of the requirement of the diploma of Information
Technology
GROUP MEMBERS
GUIDED BY MISS.
Tanuja Bhoir
MAHARASHTRA STATE BOARD OF TECHNICAL
EDUCATION, MUMBAI
CERTIFICATE
CERTIFICATE
CERTIFICATE
in the academic
Signature of Student
1.
2.
3.
4.
5.
ACKNOWLEDGEMENT
We extend our special thanks to all teaching and non-teaching staff. Success is nourished
under the combination of perfect guidance, care and blessing. Acknowledgement is the best
way to convey Last few years spend in estimated institution has moulded us into confident
and aspiring engineers. We express our sense of gratitude towards our project guide Miss.
Tanuja Bhoir It is because of her valuable guidance, analytical approach encouragement
that we could learn, work and complete the project. We will always cherish great experience
work under the enthusiastic guidance.
We are also grateful to our principal and our vice principal who not only supported us in our
project but also encouraged for every creative activity. We also sincerely give thanks to our
head of department Mrs. Madhura Mahindrakar of computer and its sector, friends and
well-wishers to directly or indirectly contribute for the success of our maiden mission.
INDEX
SR.NO. TITLE
1. AIM
2. MICROPROJECT PROPOSAL
3. INTRODUCTION
4. METHODOLOGY
5. CODE
6. OUTPUT
7. CONCLUSION
8. AREA OF IMPROVEMENT
9. REFERENCE
AIM
BACKGROUND :
The intended course outcome for the Tic-Tac-Toe game implementation in C++ is to help
students fundamental programming concepts like arrays, loops, and conditionals while
developing problem-solving skills through game logic. By creating modular functions and
handling user input with validation, students will gain experience in writing clean,
maintainable code. This project provides a practical understanding of C++ by building a
simple console-based game.
LITERATURE REVIEW :
The literature review for the Tic-Tac-Toe game implementation in C++ explores various
approaches to building interactive games using basic programming constructs. Studies on
game algorithms, such as the minimax algorithm, have shown how game AI can be enhanced
to make optimal decisions. However, for simpler, two-player versions of Tic-Tac-Toe,
research primarily focuses on efficient use of arrays or matrices to represent the game board,
and the application of conditional statements to check for winning or draw conditions. Prior
implementations emphasize modularity, using functions to break down tasks like user input,
move validation, and game state checks, demonstrating effective programming practices in
C++.
INTRODUCTION
The Tic-Tac-Toe game implementation project in C++ is designed to help students apply
their knowledge of fundamental programming concepts by developing a simple yet
interactive console-based game. Tic-Tac-Toe is a well-known two-player game where each
player alternates marking "X" or "O" on a 3x3 grid, with the goal of aligning three marks in a
row, column, or diagonal. This project allows students to dive into key aspects of C++
programming, such as working with arrays to represent the game board, using loops and
conditionals to manage game flow, and implementing functions to promote modularity and
code reuse. It provides a practical environment where students can practice input validation,
error handling, and managing user interactions, ensuring the game runs smoothly. By
breaking down the game logic into manageable tasks—such as checking for a win or draw,
ensuring valid moves, and switching between players—students gain valuable experience in
problem-solving and algorithmic thinking. Furthermore, the project introduces the concept of
structuring code efficiently, reinforcing good programming habits that are essential for more
complex software development. Ultimately, this project serves as a foundational step toward
mastering C++ by blending theory with a fun and interactive coding experience.
METHODOLOGY
This Micro project based on C++language has been completed and performed by the
involvement of all the group members. All the group members had performed and done their
work correctly.
1. Sonali jadhav provided information for micro project and worked upon
certificates,Aim and Introduction.
2. Shradha Padval provided information for the micro project and worked on
program of the microproject.
3. Prisha Palkhe provided information for the micro project and has worked on action
plan and application of these micro project.
4. Rajashree Khandagale provided information for the micro project and provided
information about the skills developed.
5.
RESOURCES REQUIRED
#include <iostream>
using namespace std;
// TicTacToe class
class TicTacToe {
private:
char board[3][3]; // 3x3 board
char currentPlayer;
public:
// Constructor to initialize the board and set the first player
TicTacToe() {
currentPlayer = 'X';
for (int i = 0; i < 3; ++i) {
for (int j = 0; j < 3; ++j) {
board[i][j] = '1' + i * 3 + j; // Fill board with numbers 1-9
}
}
}
if (checkWin()) {
cout << "Player " << currentPlayer << " wins!" << endl;
gameWon = true;
} else if (checkDraw()) {
cout << "It's a draw!" << endl;
} else {
switchPlayer(); // Switch to the next player
}
} else {
cout << "Invalid move! Please enter a valid position." << endl;
}
}
}
};
// Main function
int main() {
TicTacToe game; // Create a TicTacToe game object
game.play(); // Start the game
return 0;
}
OUTPUT
CONCLUSION
https://www.geeksforgeeks.org/tic-tac-toe-game-in-cpp/
https://guiprojects.com/c-tic-tac-toe-game-project/
https://www.scaler.com/topics/tic-tac-toe-cpp/