You are on page 1of 5

A

PROJECT REPORT ON

“ Rock-Paper-Scissor ”
SUBMITTED BY
Mr. KALE BHUSHAN ULHAS [125]
Mr. KOTHULE GANESH SHARAD [136]
Mr. KUKADE ADITYA BHUPENDRA [138]
Mr. KOKANE ROHIT RAMDAS [133]

Under the guidance of


Prof.MR.Y.K.DHOTRE

DEPARTMENT OF COMPUTER TECHNOLOGY


Sanjivani Rural Education Society’s

SANJIVANI K.B.P POLYTECHNIC KOPARGAON :

423603,DIST: AHMEDNAGAR
CERTIFICATE
This is certify that the project report entitled

“ Rock-Paper-Scissor ”
SUBMITTED BY
Mr. KALE BHUSHAN ULHAS [125]
Mr. KOTHULE GANESH SHARAD [136]
Mr. KUKADE ADITYA BHUPENDRA [138]
Mr. KOKANE ROHIT RAMDAS [133]

Of Third semester of Diploma in ‘Computer Technology’ institute of


Sanjivani K.B.P Polytechnic Kopargaon has submitted the Micro-
project satisfactorily in subject “Object-Oriented Programming ” for
academic year 2023 to 2024 as prescribed in the curriculum.

Place:Kopargaon

Date:

Subject Teacher HOD Principal


ACKNOWLEDGMENT

We would take this opportunity to express our sincere thanks and gratitude to Our
Project Guide Prof.Mr.Y.K.DHOTRE, Department of Computer Technology, Sanjivani
K.B.P. Polytechnic, Kopargaon. For her guidance and support in completing this
project. Lots of thanks to Head of Computer technology Department Prof. G.N.
Jorvekar for providing us the best support we ever had. We like to express our sincere
gratitude to Mr. A. R. Mirikar, Principal, of Sanjivani K.B.P. Polytechnic, Kopargaon for
providing a great platform to complete the project within the scheduled time. Last
but not the least; we would like to say thanks to our family and friends for their never
ending love, help, and support in so many ways through all this time.A big thanks to
all who have willingly helped us out wIth their ability.
1. KALE BHUSHAN
2. KOTHULE GANESH
3. KUKADE ADITYA
4. KOKANE ROHIT

SR.NO INDEX

1 PROGRAM CODE

2 OUTPUT

3 CONCLUSION
• PROGRAM CODE

#include <iostream>
#include <cstdlib>
#include <ctime>

#define ROCK 1
#define PAPER 2
#define SCISSORS 3

using namespace std;

int main()
{

srand((unsigned int) time(NULL));

int player_throw = 0;
int ai_throw = 0;
bool draw = false;

do
{

cout << "Select your throw." << endl;


cout << "1) Rock" << endl;
cout << "2) Paper" << endl;
cout << "3) Scissors" << endl;
cout << "Selection: ";
cin >> player_throw;

cout << endl;

ai_throw = (rand() % 3) + 1;

if (ai_throw == ROCK)
{
cout << "AI throws ROCK." << endl;
}
else if (ai_throw == PAPER)
{
cout << "AI throws PAPER." << endl;
}
else if (ai_throw == SCISSORS)
{
cout << "AI throws SCISSORS." << endl;
}

if (player_throw == ai_throw)
{
draw = true;
cout << "Draw! Play again!" << endl;
}
else if (player_throw == ROCK && ai_throw == SCISSORS)
{
cout << "ROCK beats SCISSORS! YOU WIN." << endl;
}
else if (player_throw == ROCK && ai_throw == PAPER)
{
cout << "PAPER beats ROCK! YOU LOSE." << endl;
}
else if (player_throw == PAPER && ai_throw == ROCK)
{
cout << "PAPER beats ROCK! YOU WIN." << endl;
}
else if (player_throw == PAPER && ai_throw == SCISSORS)
{
cout << "SCISSORS beats PAPER! YOU LOSE." << endl;
}
else if (player_throw == SCISSORS && ai_throw == PAPER)
{
cout << "SCISSORS beats PAPER! YOU WIN." << endl;
}
else if (player_throw == SCISSORS && ai_throw == ROCK)
{
cout << "ROCK beats SCISSORS! YOU LOSE." << endl;
}

cout << endl;

} while (draw);

return 0;
}

• OUTPUT

• CONCLUSION

Object-Oriented Programming (OOP) is of paramount importance in C++ and software development as a whole. By
embracing OOP principles such as modularity, encapsulation, inheritance, polymorphism, and abstraction, developers
can create modular, maintainable, and scalable C++ applications.

You might also like