SlideShare uma empresa Scribd logo
1 de 2
Baixar para ler offline
Objective
This practical tests your skills in writing classes. It also requires a planned application of logic
and code structure.
Problem
In this practical assignment, you are going to implement a simple Rock, Paper, Scissors game in
C++. Two players compete and, independently, choose one of Rock, Paper, or Scissors. They
then simultaneously declare their choices. The winner of the game is determined by comparing
the choices of the players. Rock beats Scissors, Scissors beats Paper, Paper beats Rock.
Your design and implementation needs to adhere to the following interfaces.
Player (abstract class)
char makeMove( );
string getName( );
Referee
Referee( ); // constructor
Player * refGame(Player * player1, Player * player2)
// returns the reference to the winning player
Your submission should contain
Implementation Details
Computer Player
For this assignment, to make things simple, we assume that the computer player only plays Rock
and has the name "Computer"
Human Player
A human player object gets its move from user input. The test system will expect an interface
where the prompt: Enter move: is displayed and the move is input on the keyboard (ie each time
the human player makes a move it will prompt the user to enter a move and expect the user to
type a character among R, P, and S followed by pressing the return/enter key.
The human constructor should take a single string which is the human's name. If this string is not
passed as a parameter, the name should be set to "Human".
Gradescope marking is strict on this, ensure your prompt matches this exactly and does not print
any other prompts.
Referee
The referee class will match two players and return a reference to the winning player. In the case
of a tie, the referee will return a nullptr.
The main
The main program will create the referee and players, and then ask the referee to adjudicate a
game. The main function may create any number of players/referees and call play as many times
as it wants.
Main will then print the name of the winner.
For example, if the human player named Mei plays P the output should be Mei Wins. Another
example: if the human plays R, the output should be It's a Tie. If Mei plays S, the output should
be Computer Wins. (recall the dump computer player always plays rock).
The main purpose of this practical is for you to practice organizing and writing classes and to
recognise how your implementation of your classes can change without having to change the
code in main.
In testing, your code will be tested against our own testing main which will only compile against
the approved interfaces.

Mais conteúdo relacionado

Semelhante a Objective This practical tests your skills in writing classes- It also.pdf

Tic tac toe c++ programing
Tic tac toe c++ programingTic tac toe c++ programing
Tic tac toe c++ programingKrishna Agarwal
 
Data Driven Game development
Data Driven Game developmentData Driven Game development
Data Driven Game developmentKostas Anagnostou
 
Galactic Wars XNA Game
Galactic Wars XNA GameGalactic Wars XNA Game
Galactic Wars XNA GameSohil Gupta
 
You will write a multi-interface version of the well-known concentra.pdf
You will write a multi-interface version of the well-known concentra.pdfYou will write a multi-interface version of the well-known concentra.pdf
You will write a multi-interface version of the well-known concentra.pdfFashionColZone
 
Tutorial Realm Crafter
Tutorial Realm CrafterTutorial Realm Crafter
Tutorial Realm CrafterAlejandrukii
 
Artificial Intelligence gaming techniques
Artificial Intelligence gaming techniquesArtificial Intelligence gaming techniques
Artificial Intelligence gaming techniquesSomnathMore3
 
Dice Game Case Study 11 30 6
Dice Game Case Study 11 30 6Dice Game Case Study 11 30 6
Dice Game Case Study 11 30 6Rajesh Kumar
 
Multiplayer Networking Game
Multiplayer Networking GameMultiplayer Networking Game
Multiplayer Networking GameTanmay Krishna
 
Game Development Session - 3 | Introduction to Unity
Game Development Session - 3 | Introduction to  UnityGame Development Session - 3 | Introduction to  Unity
Game Development Session - 3 | Introduction to UnityKoderunners
 
Java Tutorial: Part 1. Getting Started
Java Tutorial: Part 1. Getting StartedJava Tutorial: Part 1. Getting Started
Java Tutorial: Part 1. Getting StartedSvetlin Nakov
 
Most asked JAVA Interview Questions & Answers.
Most asked JAVA Interview Questions & Answers.Most asked JAVA Interview Questions & Answers.
Most asked JAVA Interview Questions & Answers.Questpond
 
Game Design Document - Step by Step Guide
Game Design Document - Step by Step GuideGame Design Document - Step by Step Guide
Game Design Document - Step by Step GuideDevBatch Inc.
 
Inheritance - Creating a Multilevel Hierarchy In this lab- you will s.pdf
Inheritance - Creating a Multilevel Hierarchy  In this lab- you will s.pdfInheritance - Creating a Multilevel Hierarchy  In this lab- you will s.pdf
Inheritance - Creating a Multilevel Hierarchy In this lab- you will s.pdfEvanpZjSandersony
 
Cis 170 ilab 5 of 7
Cis 170 ilab 5 of 7Cis 170 ilab 5 of 7
Cis 170 ilab 5 of 7comp274
 
Making a game "Just Right" through testing and play balancing
Making a game "Just Right" through testing and play balancingMaking a game "Just Right" through testing and play balancing
Making a game "Just Right" through testing and play balancingJulio Gorgé
 

Semelhante a Objective This practical tests your skills in writing classes- It also.pdf (17)

Tic tac toe c++ programing
Tic tac toe c++ programingTic tac toe c++ programing
Tic tac toe c++ programing
 
Data Driven Game development
Data Driven Game developmentData Driven Game development
Data Driven Game development
 
Galactic Wars XNA Game
Galactic Wars XNA GameGalactic Wars XNA Game
Galactic Wars XNA Game
 
You will write a multi-interface version of the well-known concentra.pdf
You will write a multi-interface version of the well-known concentra.pdfYou will write a multi-interface version of the well-known concentra.pdf
You will write a multi-interface version of the well-known concentra.pdf
 
Computer Science Homework Help
Computer Science Homework HelpComputer Science Homework Help
Computer Science Homework Help
 
Tutorial Realm Crafter
Tutorial Realm CrafterTutorial Realm Crafter
Tutorial Realm Crafter
 
Artificial Intelligence gaming techniques
Artificial Intelligence gaming techniquesArtificial Intelligence gaming techniques
Artificial Intelligence gaming techniques
 
Dice Game Case Study 11 30 6
Dice Game Case Study 11 30 6Dice Game Case Study 11 30 6
Dice Game Case Study 11 30 6
 
python.pptx
python.pptxpython.pptx
python.pptx
 
Multiplayer Networking Game
Multiplayer Networking GameMultiplayer Networking Game
Multiplayer Networking Game
 
Game Development Session - 3 | Introduction to Unity
Game Development Session - 3 | Introduction to  UnityGame Development Session - 3 | Introduction to  Unity
Game Development Session - 3 | Introduction to Unity
 
Java Tutorial: Part 1. Getting Started
Java Tutorial: Part 1. Getting StartedJava Tutorial: Part 1. Getting Started
Java Tutorial: Part 1. Getting Started
 
Most asked JAVA Interview Questions & Answers.
Most asked JAVA Interview Questions & Answers.Most asked JAVA Interview Questions & Answers.
Most asked JAVA Interview Questions & Answers.
 
Game Design Document - Step by Step Guide
Game Design Document - Step by Step GuideGame Design Document - Step by Step Guide
Game Design Document - Step by Step Guide
 
Inheritance - Creating a Multilevel Hierarchy In this lab- you will s.pdf
Inheritance - Creating a Multilevel Hierarchy  In this lab- you will s.pdfInheritance - Creating a Multilevel Hierarchy  In this lab- you will s.pdf
Inheritance - Creating a Multilevel Hierarchy In this lab- you will s.pdf
 
Cis 170 ilab 5 of 7
Cis 170 ilab 5 of 7Cis 170 ilab 5 of 7
Cis 170 ilab 5 of 7
 
Making a game "Just Right" through testing and play balancing
Making a game "Just Right" through testing and play balancingMaking a game "Just Right" through testing and play balancing
Making a game "Just Right" through testing and play balancing
 

Mais de Augstore

Note- Always keep track of your work- Wowza Corporation manufactures p.pdf
Note- Always keep track of your work- Wowza Corporation manufactures p.pdfNote- Always keep track of your work- Wowza Corporation manufactures p.pdf
Note- Always keep track of your work- Wowza Corporation manufactures p.pdfAugstore
 
Note- Can someone help me with the public boolean isEmpty()- public bo.pdf
Note- Can someone help me with the public boolean isEmpty()- public bo.pdfNote- Can someone help me with the public boolean isEmpty()- public bo.pdf
Note- Can someone help me with the public boolean isEmpty()- public bo.pdfAugstore
 
Note- 1- There was no retirement of stock during the yoar- A- There wa.pdf
Note- 1- There was no retirement of stock during the yoar- A- There wa.pdfNote- 1- There was no retirement of stock during the yoar- A- There wa.pdf
Note- 1- There was no retirement of stock during the yoar- A- There wa.pdfAugstore
 
Note the image showing a series of batholiths on the landscape- How di.pdf
Note the image showing a series of batholiths on the landscape- How di.pdfNote the image showing a series of batholiths on the landscape- How di.pdf
Note the image showing a series of batholiths on the landscape- How di.pdfAugstore
 
note 2^R stand for w reversed (c) L3-{ww-wR-w is odd with 010 as the m.pdf
note 2^R stand for w reversed (c) L3-{ww-wR-w is odd with 010 as the m.pdfnote 2^R stand for w reversed (c) L3-{ww-wR-w is odd with 010 as the m.pdf
note 2^R stand for w reversed (c) L3-{ww-wR-w is odd with 010 as the m.pdfAugstore
 
Not yet answered Points out of 1-00 Flag question It seems kind of wei.pdf
Not yet answered Points out of 1-00 Flag question It seems kind of wei.pdfNot yet answered Points out of 1-00 Flag question It seems kind of wei.pdf
Not yet answered Points out of 1-00 Flag question It seems kind of wei.pdfAugstore
 
Not yet answered Points out of 1-00 Flag question Stephanie likes to p.pdf
Not yet answered Points out of 1-00 Flag question Stephanie likes to p.pdfNot yet answered Points out of 1-00 Flag question Stephanie likes to p.pdf
Not yet answered Points out of 1-00 Flag question Stephanie likes to p.pdfAugstore
 
Not able to run quiz question -- Define an array of objects with qu.pdf
Not able to run quiz question    -- Define an array of objects with qu.pdfNot able to run quiz question    -- Define an array of objects with qu.pdf
Not able to run quiz question -- Define an array of objects with qu.pdfAugstore
 
Not for Profit class The non-profit is planned parenthood Discuss ho.pdf
Not for Profit class The non-profit is planned parenthood   Discuss ho.pdfNot for Profit class The non-profit is planned parenthood   Discuss ho.pdf
Not for Profit class The non-profit is planned parenthood Discuss ho.pdfAugstore
 
Not long ago- the Federal Communications Commission (FCC) implemented.pdf
Not long ago- the Federal Communications Commission (FCC) implemented.pdfNot long ago- the Federal Communications Commission (FCC) implemented.pdf
Not long ago- the Federal Communications Commission (FCC) implemented.pdfAugstore
 
Nonchalant Actron (NA) has a current dividend (D0) of $1-80- Dividends.pdf
Nonchalant Actron (NA) has a current dividend (D0) of $1-80- Dividends.pdfNonchalant Actron (NA) has a current dividend (D0) of $1-80- Dividends.pdf
Nonchalant Actron (NA) has a current dividend (D0) of $1-80- Dividends.pdfAugstore
 
Non-foliated metamorphic rocks generally are- composed of a few visibl.pdf
Non-foliated metamorphic rocks generally are- composed of a few visibl.pdfNon-foliated metamorphic rocks generally are- composed of a few visibl.pdf
Non-foliated metamorphic rocks generally are- composed of a few visibl.pdfAugstore
 
Non-financial reporting With the growth in non-financial reporting ove.pdf
Non-financial reporting With the growth in non-financial reporting ove.pdfNon-financial reporting With the growth in non-financial reporting ove.pdf
Non-financial reporting With the growth in non-financial reporting ove.pdfAugstore
 
Nominal GDP of Utopia was the highest in Real GDP of Utopia in 2016 is.pdf
Nominal GDP of Utopia was the highest in Real GDP of Utopia in 2016 is.pdfNominal GDP of Utopia was the highest in Real GDP of Utopia in 2016 is.pdf
Nominal GDP of Utopia was the highest in Real GDP of Utopia in 2016 is.pdfAugstore
 
Non-marine (live in water that is not seawater) diatoms are algae that.pdf
Non-marine (live in water that is not seawater) diatoms are algae that.pdfNon-marine (live in water that is not seawater) diatoms are algae that.pdf
Non-marine (live in water that is not seawater) diatoms are algae that.pdfAugstore
 
No outstanding checks and no deposits in transit were noted in August- (1).pdf
No outstanding checks and no deposits in transit were noted in August- (1).pdfNo outstanding checks and no deposits in transit were noted in August- (1).pdf
No outstanding checks and no deposits in transit were noted in August- (1).pdfAugstore
 
Nittany Company uses a periodic inventory system- At the end of the an.pdf
Nittany Company uses a periodic inventory system- At the end of the an.pdfNittany Company uses a periodic inventory system- At the end of the an.pdf
Nittany Company uses a periodic inventory system- At the end of the an.pdfAugstore
 
NIKE- INC- Condensed Balance Sheet May 31 (-$ in millions) Assets Curr.pdf
NIKE- INC- Condensed Balance Sheet May 31 (-$ in millions) Assets Curr.pdfNIKE- INC- Condensed Balance Sheet May 31 (-$ in millions) Assets Curr.pdf
NIKE- INC- Condensed Balance Sheet May 31 (-$ in millions) Assets Curr.pdfAugstore
 
News Revlew 4- Continuous Process Improvement Program Upon successful.pdf
News Revlew 4- Continuous Process Improvement Program Upon successful.pdfNews Revlew 4- Continuous Process Improvement Program Upon successful.pdf
News Revlew 4- Continuous Process Improvement Program Upon successful.pdfAugstore
 
Nick is a male who displays a rare mitochondrial disease- Nick's wife-.pdf
Nick is a male who displays a rare mitochondrial disease- Nick's wife-.pdfNick is a male who displays a rare mitochondrial disease- Nick's wife-.pdf
Nick is a male who displays a rare mitochondrial disease- Nick's wife-.pdfAugstore
 

Mais de Augstore (20)

Note- Always keep track of your work- Wowza Corporation manufactures p.pdf
Note- Always keep track of your work- Wowza Corporation manufactures p.pdfNote- Always keep track of your work- Wowza Corporation manufactures p.pdf
Note- Always keep track of your work- Wowza Corporation manufactures p.pdf
 
Note- Can someone help me with the public boolean isEmpty()- public bo.pdf
Note- Can someone help me with the public boolean isEmpty()- public bo.pdfNote- Can someone help me with the public boolean isEmpty()- public bo.pdf
Note- Can someone help me with the public boolean isEmpty()- public bo.pdf
 
Note- 1- There was no retirement of stock during the yoar- A- There wa.pdf
Note- 1- There was no retirement of stock during the yoar- A- There wa.pdfNote- 1- There was no retirement of stock during the yoar- A- There wa.pdf
Note- 1- There was no retirement of stock during the yoar- A- There wa.pdf
 
Note the image showing a series of batholiths on the landscape- How di.pdf
Note the image showing a series of batholiths on the landscape- How di.pdfNote the image showing a series of batholiths on the landscape- How di.pdf
Note the image showing a series of batholiths on the landscape- How di.pdf
 
note 2^R stand for w reversed (c) L3-{ww-wR-w is odd with 010 as the m.pdf
note 2^R stand for w reversed (c) L3-{ww-wR-w is odd with 010 as the m.pdfnote 2^R stand for w reversed (c) L3-{ww-wR-w is odd with 010 as the m.pdf
note 2^R stand for w reversed (c) L3-{ww-wR-w is odd with 010 as the m.pdf
 
Not yet answered Points out of 1-00 Flag question It seems kind of wei.pdf
Not yet answered Points out of 1-00 Flag question It seems kind of wei.pdfNot yet answered Points out of 1-00 Flag question It seems kind of wei.pdf
Not yet answered Points out of 1-00 Flag question It seems kind of wei.pdf
 
Not yet answered Points out of 1-00 Flag question Stephanie likes to p.pdf
Not yet answered Points out of 1-00 Flag question Stephanie likes to p.pdfNot yet answered Points out of 1-00 Flag question Stephanie likes to p.pdf
Not yet answered Points out of 1-00 Flag question Stephanie likes to p.pdf
 
Not able to run quiz question -- Define an array of objects with qu.pdf
Not able to run quiz question    -- Define an array of objects with qu.pdfNot able to run quiz question    -- Define an array of objects with qu.pdf
Not able to run quiz question -- Define an array of objects with qu.pdf
 
Not for Profit class The non-profit is planned parenthood Discuss ho.pdf
Not for Profit class The non-profit is planned parenthood   Discuss ho.pdfNot for Profit class The non-profit is planned parenthood   Discuss ho.pdf
Not for Profit class The non-profit is planned parenthood Discuss ho.pdf
 
Not long ago- the Federal Communications Commission (FCC) implemented.pdf
Not long ago- the Federal Communications Commission (FCC) implemented.pdfNot long ago- the Federal Communications Commission (FCC) implemented.pdf
Not long ago- the Federal Communications Commission (FCC) implemented.pdf
 
Nonchalant Actron (NA) has a current dividend (D0) of $1-80- Dividends.pdf
Nonchalant Actron (NA) has a current dividend (D0) of $1-80- Dividends.pdfNonchalant Actron (NA) has a current dividend (D0) of $1-80- Dividends.pdf
Nonchalant Actron (NA) has a current dividend (D0) of $1-80- Dividends.pdf
 
Non-foliated metamorphic rocks generally are- composed of a few visibl.pdf
Non-foliated metamorphic rocks generally are- composed of a few visibl.pdfNon-foliated metamorphic rocks generally are- composed of a few visibl.pdf
Non-foliated metamorphic rocks generally are- composed of a few visibl.pdf
 
Non-financial reporting With the growth in non-financial reporting ove.pdf
Non-financial reporting With the growth in non-financial reporting ove.pdfNon-financial reporting With the growth in non-financial reporting ove.pdf
Non-financial reporting With the growth in non-financial reporting ove.pdf
 
Nominal GDP of Utopia was the highest in Real GDP of Utopia in 2016 is.pdf
Nominal GDP of Utopia was the highest in Real GDP of Utopia in 2016 is.pdfNominal GDP of Utopia was the highest in Real GDP of Utopia in 2016 is.pdf
Nominal GDP of Utopia was the highest in Real GDP of Utopia in 2016 is.pdf
 
Non-marine (live in water that is not seawater) diatoms are algae that.pdf
Non-marine (live in water that is not seawater) diatoms are algae that.pdfNon-marine (live in water that is not seawater) diatoms are algae that.pdf
Non-marine (live in water that is not seawater) diatoms are algae that.pdf
 
No outstanding checks and no deposits in transit were noted in August- (1).pdf
No outstanding checks and no deposits in transit were noted in August- (1).pdfNo outstanding checks and no deposits in transit were noted in August- (1).pdf
No outstanding checks and no deposits in transit were noted in August- (1).pdf
 
Nittany Company uses a periodic inventory system- At the end of the an.pdf
Nittany Company uses a periodic inventory system- At the end of the an.pdfNittany Company uses a periodic inventory system- At the end of the an.pdf
Nittany Company uses a periodic inventory system- At the end of the an.pdf
 
NIKE- INC- Condensed Balance Sheet May 31 (-$ in millions) Assets Curr.pdf
NIKE- INC- Condensed Balance Sheet May 31 (-$ in millions) Assets Curr.pdfNIKE- INC- Condensed Balance Sheet May 31 (-$ in millions) Assets Curr.pdf
NIKE- INC- Condensed Balance Sheet May 31 (-$ in millions) Assets Curr.pdf
 
News Revlew 4- Continuous Process Improvement Program Upon successful.pdf
News Revlew 4- Continuous Process Improvement Program Upon successful.pdfNews Revlew 4- Continuous Process Improvement Program Upon successful.pdf
News Revlew 4- Continuous Process Improvement Program Upon successful.pdf
 
Nick is a male who displays a rare mitochondrial disease- Nick's wife-.pdf
Nick is a male who displays a rare mitochondrial disease- Nick's wife-.pdfNick is a male who displays a rare mitochondrial disease- Nick's wife-.pdf
Nick is a male who displays a rare mitochondrial disease- Nick's wife-.pdf
 

Último

Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin ClassesCeline George
 
Dyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptxDyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptxcallscotland1987
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfSherif Taha
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Jisc
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsMebane Rash
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.pptRamjanShidvankar
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...christianmathematics
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxRamakrishna Reddy Bijjam
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the ClassroomPooky Knightsmith
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibitjbellavia9
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.MaryamAhmad92
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxVishalSingh1417
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17Celine George
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxheathfieldcps1
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...ZurliaSoop
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...pradhanghanshyam7136
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024Elizabeth Walsh
 

Último (20)

Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
 
Dyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptxDyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptx
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the Classroom
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024
 

Objective This practical tests your skills in writing classes- It also.pdf

  • 1. Objective This practical tests your skills in writing classes. It also requires a planned application of logic and code structure. Problem In this practical assignment, you are going to implement a simple Rock, Paper, Scissors game in C++. Two players compete and, independently, choose one of Rock, Paper, or Scissors. They then simultaneously declare their choices. The winner of the game is determined by comparing the choices of the players. Rock beats Scissors, Scissors beats Paper, Paper beats Rock. Your design and implementation needs to adhere to the following interfaces. Player (abstract class) char makeMove( ); string getName( ); Referee Referee( ); // constructor Player * refGame(Player * player1, Player * player2) // returns the reference to the winning player Your submission should contain Implementation Details Computer Player For this assignment, to make things simple, we assume that the computer player only plays Rock and has the name "Computer" Human Player A human player object gets its move from user input. The test system will expect an interface where the prompt: Enter move: is displayed and the move is input on the keyboard (ie each time the human player makes a move it will prompt the user to enter a move and expect the user to type a character among R, P, and S followed by pressing the return/enter key. The human constructor should take a single string which is the human's name. If this string is not passed as a parameter, the name should be set to "Human". Gradescope marking is strict on this, ensure your prompt matches this exactly and does not print any other prompts.
  • 2. Referee The referee class will match two players and return a reference to the winning player. In the case of a tie, the referee will return a nullptr. The main The main program will create the referee and players, and then ask the referee to adjudicate a game. The main function may create any number of players/referees and call play as many times as it wants. Main will then print the name of the winner. For example, if the human player named Mei plays P the output should be Mei Wins. Another example: if the human plays R, the output should be It's a Tie. If Mei plays S, the output should be Computer Wins. (recall the dump computer player always plays rock). The main purpose of this practical is for you to practice organizing and writing classes and to recognise how your implementation of your classes can change without having to change the code in main. In testing, your code will be tested against our own testing main which will only compile against the approved interfaces.