SlideShare a Scribd company logo
1 of 2
Download to read 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.

More Related Content

Similar to 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é
 

Similar to 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
 

More from 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
 

More from 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
 

Recently uploaded

24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...
24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...
24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...Nguyen Thanh Tu Collection
 
BỘ LUYỆN NGHE TIẾNG ANH 8 GLOBAL SUCCESS CẢ NĂM (GỒM 12 UNITS, MỖI UNIT GỒM 3...
BỘ LUYỆN NGHE TIẾNG ANH 8 GLOBAL SUCCESS CẢ NĂM (GỒM 12 UNITS, MỖI UNIT GỒM 3...BỘ LUYỆN NGHE TIẾNG ANH 8 GLOBAL SUCCESS CẢ NĂM (GỒM 12 UNITS, MỖI UNIT GỒM 3...
BỘ LUYỆN NGHE TIẾNG ANH 8 GLOBAL SUCCESS CẢ NĂM (GỒM 12 UNITS, MỖI UNIT GỒM 3...Nguyen Thanh Tu Collection
 
Features of Video Calls in the Discuss Module in Odoo 17
Features of Video Calls in the Discuss Module in Odoo 17Features of Video Calls in the Discuss Module in Odoo 17
Features of Video Calls in the Discuss Module in Odoo 17Celine George
 
diagnosting testing bsc 2nd sem.pptx....
diagnosting testing bsc 2nd sem.pptx....diagnosting testing bsc 2nd sem.pptx....
diagnosting testing bsc 2nd sem.pptx....Ritu480198
 
philosophy and it's principles based on the life
philosophy and it's principles based on the lifephilosophy and it's principles based on the life
philosophy and it's principles based on the lifeNitinDeodare
 
Implanted Devices - VP Shunts: EMGuidewire's Radiology Reading Room
Implanted Devices - VP Shunts: EMGuidewire's Radiology Reading RoomImplanted Devices - VP Shunts: EMGuidewire's Radiology Reading Room
Implanted Devices - VP Shunts: EMGuidewire's Radiology Reading RoomSean M. Fox
 
PSYPACT- Practicing Over State Lines May 2024.pptx
PSYPACT- Practicing Over State Lines May 2024.pptxPSYPACT- Practicing Over State Lines May 2024.pptx
PSYPACT- Practicing Over State Lines May 2024.pptxMarlene Maheu
 
Poster_density_driven_with_fracture_MLMC.pdf
Poster_density_driven_with_fracture_MLMC.pdfPoster_density_driven_with_fracture_MLMC.pdf
Poster_density_driven_with_fracture_MLMC.pdfAlexander Litvinenko
 
ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...
ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...
ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...Nguyen Thanh Tu Collection
 
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT VẬT LÝ 2024 - TỪ CÁC TRƯỜNG, TRƯ...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT VẬT LÝ 2024 - TỪ CÁC TRƯỜNG, TRƯ...TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT VẬT LÝ 2024 - TỪ CÁC TRƯỜNG, TRƯ...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT VẬT LÝ 2024 - TỪ CÁC TRƯỜNG, TRƯ...Nguyen Thanh Tu Collection
 
Sternal Fractures & Dislocations - EMGuidewire Radiology Reading Room
Sternal Fractures & Dislocations - EMGuidewire Radiology Reading RoomSternal Fractures & Dislocations - EMGuidewire Radiology Reading Room
Sternal Fractures & Dislocations - EMGuidewire Radiology Reading RoomSean M. Fox
 
How To Create Editable Tree View in Odoo 17
How To Create Editable Tree View in Odoo 17How To Create Editable Tree View in Odoo 17
How To Create Editable Tree View in Odoo 17Celine George
 
An Overview of the Odoo 17 Knowledge App
An Overview of the Odoo 17 Knowledge AppAn Overview of the Odoo 17 Knowledge App
An Overview of the Odoo 17 Knowledge AppCeline George
 
Graduate Outcomes Presentation Slides - English (v3).pptx
Graduate Outcomes Presentation Slides - English (v3).pptxGraduate Outcomes Presentation Slides - English (v3).pptx
Graduate Outcomes Presentation Slides - English (v3).pptxneillewis46
 
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽中 央社
 
Chapter 7 Pharmacosy Traditional System of Medicine & Ayurvedic Preparations ...
Chapter 7 Pharmacosy Traditional System of Medicine & Ayurvedic Preparations ...Chapter 7 Pharmacosy Traditional System of Medicine & Ayurvedic Preparations ...
Chapter 7 Pharmacosy Traditional System of Medicine & Ayurvedic Preparations ...Sumit Tiwari
 
Exploring Gemini AI and Integration with MuleSoft | MuleSoft Mysore Meetup #45
Exploring Gemini AI and Integration with MuleSoft | MuleSoft Mysore Meetup #45Exploring Gemini AI and Integration with MuleSoft | MuleSoft Mysore Meetup #45
Exploring Gemini AI and Integration with MuleSoft | MuleSoft Mysore Meetup #45MysoreMuleSoftMeetup
 

Recently uploaded (20)

24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...
24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...
24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...
 
BỘ LUYỆN NGHE TIẾNG ANH 8 GLOBAL SUCCESS CẢ NĂM (GỒM 12 UNITS, MỖI UNIT GỒM 3...
BỘ LUYỆN NGHE TIẾNG ANH 8 GLOBAL SUCCESS CẢ NĂM (GỒM 12 UNITS, MỖI UNIT GỒM 3...BỘ LUYỆN NGHE TIẾNG ANH 8 GLOBAL SUCCESS CẢ NĂM (GỒM 12 UNITS, MỖI UNIT GỒM 3...
BỘ LUYỆN NGHE TIẾNG ANH 8 GLOBAL SUCCESS CẢ NĂM (GỒM 12 UNITS, MỖI UNIT GỒM 3...
 
Features of Video Calls in the Discuss Module in Odoo 17
Features of Video Calls in the Discuss Module in Odoo 17Features of Video Calls in the Discuss Module in Odoo 17
Features of Video Calls in the Discuss Module in Odoo 17
 
diagnosting testing bsc 2nd sem.pptx....
diagnosting testing bsc 2nd sem.pptx....diagnosting testing bsc 2nd sem.pptx....
diagnosting testing bsc 2nd sem.pptx....
 
IPL Online Quiz by Pragya; Question Set.
IPL Online Quiz by Pragya; Question Set.IPL Online Quiz by Pragya; Question Set.
IPL Online Quiz by Pragya; Question Set.
 
philosophy and it's principles based on the life
philosophy and it's principles based on the lifephilosophy and it's principles based on the life
philosophy and it's principles based on the life
 
Implanted Devices - VP Shunts: EMGuidewire's Radiology Reading Room
Implanted Devices - VP Shunts: EMGuidewire's Radiology Reading RoomImplanted Devices - VP Shunts: EMGuidewire's Radiology Reading Room
Implanted Devices - VP Shunts: EMGuidewire's Radiology Reading Room
 
PSYPACT- Practicing Over State Lines May 2024.pptx
PSYPACT- Practicing Over State Lines May 2024.pptxPSYPACT- Practicing Over State Lines May 2024.pptx
PSYPACT- Practicing Over State Lines May 2024.pptx
 
Poster_density_driven_with_fracture_MLMC.pdf
Poster_density_driven_with_fracture_MLMC.pdfPoster_density_driven_with_fracture_MLMC.pdf
Poster_density_driven_with_fracture_MLMC.pdf
 
ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...
ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...
ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...
 
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT VẬT LÝ 2024 - TỪ CÁC TRƯỜNG, TRƯ...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT VẬT LÝ 2024 - TỪ CÁC TRƯỜNG, TRƯ...TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT VẬT LÝ 2024 - TỪ CÁC TRƯỜNG, TRƯ...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT VẬT LÝ 2024 - TỪ CÁC TRƯỜNG, TRƯ...
 
“O BEIJO” EM ARTE .
“O BEIJO” EM ARTE                       .“O BEIJO” EM ARTE                       .
“O BEIJO” EM ARTE .
 
Sternal Fractures & Dislocations - EMGuidewire Radiology Reading Room
Sternal Fractures & Dislocations - EMGuidewire Radiology Reading RoomSternal Fractures & Dislocations - EMGuidewire Radiology Reading Room
Sternal Fractures & Dislocations - EMGuidewire Radiology Reading Room
 
How To Create Editable Tree View in Odoo 17
How To Create Editable Tree View in Odoo 17How To Create Editable Tree View in Odoo 17
How To Create Editable Tree View in Odoo 17
 
An Overview of the Odoo 17 Knowledge App
An Overview of the Odoo 17 Knowledge AppAn Overview of the Odoo 17 Knowledge App
An Overview of the Odoo 17 Knowledge App
 
Graduate Outcomes Presentation Slides - English (v3).pptx
Graduate Outcomes Presentation Slides - English (v3).pptxGraduate Outcomes Presentation Slides - English (v3).pptx
Graduate Outcomes Presentation Slides - English (v3).pptx
 
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
 
Including Mental Health Support in Project Delivery, 14 May.pdf
Including Mental Health Support in Project Delivery, 14 May.pdfIncluding Mental Health Support in Project Delivery, 14 May.pdf
Including Mental Health Support in Project Delivery, 14 May.pdf
 
Chapter 7 Pharmacosy Traditional System of Medicine & Ayurvedic Preparations ...
Chapter 7 Pharmacosy Traditional System of Medicine & Ayurvedic Preparations ...Chapter 7 Pharmacosy Traditional System of Medicine & Ayurvedic Preparations ...
Chapter 7 Pharmacosy Traditional System of Medicine & Ayurvedic Preparations ...
 
Exploring Gemini AI and Integration with MuleSoft | MuleSoft Mysore Meetup #45
Exploring Gemini AI and Integration with MuleSoft | MuleSoft Mysore Meetup #45Exploring Gemini AI and Integration with MuleSoft | MuleSoft Mysore Meetup #45
Exploring Gemini AI and Integration with MuleSoft | MuleSoft Mysore Meetup #45
 

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.