Zookal
Zookal

We’d love to hear any feedback or comment from you!

© 2011-2021 Zookal Pty Ltd

View question and answer

From our collection of questions and answers
Engineering · Computer Science
Question details

Problem Description Objective This practical tests your knowledge of implementing classes with inheritance in mind. It also requires planned pplication of logic and code structure. Design In a file named design.pdf, describe how you are going to solve the problem and test your implementation with the test cases you designed based on the stages below. Testing Hint: its easier if you test things as a small piece of code, rather than building a giant lump of code that doesnt compile or run correctly. As part of your design,you should also sketch out how you are going to build and test each function in the code Problem In this practical, you are going to improve your Rock Paper Scissors (RPS) program, allawing for greater flexibility. The rules are the same as before:two players compete by choosing Rock, Paper or Scissors and the winner of the game is determined by comparing the choices of the players. Rack beats Scissors,Scissors beats Paper, Paper beats Rock. This practical builds upon the previous practical. As such, we assume that in your implementation, there exist files named Conputer.cpp You are asked to modify these casses with the names pravided in the following individual stages 1 New computer players: Create the following computer players making use of inher-itance. Use your computer player class for Practical 2 as the base class. Note: the derived Avalanche class may be identical to your base class. RandomCdrtputer.cpp: RandonCorputer naturris random ธ0ve- Avalanche always Bureducrat.pp: Bureaucrat alyschoosas Paper Toolbox.cpp: Toolbox dledys chooses Seissors Crescendo. cpp: Crescendo moves in the foll ing order: Paper, scissors, Rock PapeDoll.epp: Paper doll nves in the follewing order: Paper, Seissors, Scissors Fistful10Collars.epp: FistfulloCollars noves in the folloning order: Rock, Peper, Paper 2 New referee: Previously, referee only matches one human player against one com- puter player. Here, your referee class should be able to match any two players together. (Hint: If you think in advance in Practical 2 and implement a common base class for all players, you may save some efforts in this Tournament: Create a class called Tournament in file Tournament.h and Tournament.cpp. In Tournament.cpp there should be a function that reads in the eight players and sets them against each other. The bracket follows the illustration as follows. The rounds are run as illustrated in the picture below In every round, the winner is determined after five plays ldraws count as plays. That is, in every round, two players play against each other five times. The one who wins more advances. If both win the same number of plays, then the player with a lawer index advances.(e.g. if Player2 and Player4 reach a tie after 5 plays, then Player2 advances. Also, players refresh their memories between rounds. That is, whenever Crescendo enters a round it plays paper first glzyers plzyerS our main.cpp file should have access to all your classes The input consists af one line: a list of computer player names (from the above Est, excluding RandomComputer divided by space where the i-th name represents Player iin the bracket. The output is the name of the grand winner Sample input: Avalanche Bureaucrat Bureaucrat Toolbox Toolbax Crescendo Crescendo FistfulIoDollars Sample output Toolbox

Answer
Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.

Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.