Hi, i want to make a uml diagram in python, main task is to identify all classes , associations - inheritance, comp, aggregation with directions and proper name in regards to association, abstract class if any and with all attributes and methods. Thank you. it will be really appreciated. it is basically uml diagram python version of mastermind computer game
htt 5: www. outube.com watch?v=wsYPsrzCKiA The Assignment Task Specification The task for the Part 1 of the assignment is to produce a UML class diagram of an application software, called the World of Mastermind (WOW, 3 text-based application software where users can play a Mastermind game. As a textbased application software, WoM will use a command line interface where users type in a command or input and the relevant output is printed onto the screen in text. When the software is executed, it will show a greeting message and a list of commands, followed by a command prompt '>' indicating the system is ready to take user's input. At the prompt, users can give one of the following commands: a r: register a new user. which will create a new user 0 5: show the score board, which will print the list of the users and their scores - p: play a game. which will start a new game - q: quit, which will quit the application For registering a new user, the system will ask forthe name of the new user. The user name is not allowed to be changed after being registered, and also the name must be unique he. not allowed to have the same name as an existing user}. A new user will always start with a score of 0 point. Below is an example of the output on the screen (users input in bold italic). 4 Welcome to the World of Mastermind! Developed by Alan Turing COMP 1046 Object-Oriented Programing What would you like to do? (r) register a new user (5) Show the score board (pl play a game (q) quit > r What is the name of the new user? >Alan Welcome, Alan! What would you like to do? (I) register a new user (5) show the score board (pl play a game (q) quit > 2 What is the name of the new user? > Alan Sorry, the name is already taken. would you like to do? register a new user show the score board Play a game quit What is the name of the new user? > Steve Welcome, Steve! Once the users are registered. they can play the game of Mastermind. Only one game will be played at a time, i.e., the game must be finished before playing another game. Before starting the game, users will be asked questions for setting it up. First, users will be asked how many players (between 2 to 4, inclusive) will play the game, followed by asking for the name of each player. lfthe name cl not match to a valid registered user or if the user with the name is already in the game, an e message will be shown and asked again. There will be a special built-in name \"HALBDOD\" a that are for players controlled by the computer. After the players are selected, the users asked to choose how many attempts (between 5 to 10, inclusive) of guessing the code wil allowed. What would you like to do? (r) register a new user (5) Show the score board \"I O A Mastermind Mastermind is a Code-breaking game (ht-l 5: en.wiki edia.or wiki Mastermind board ame ). The goal of the game is to discover a hidden code that consists of 4 colours. The board game is played using: 0 a decoding board, with a shield at one end covering a row of four large holes, and a set of rows containing four large holes next to a set of four small holes; 2 0 code marbles of six different colours (Red, Green, Blue, Yellow, white, Black) are used to represent a code and placed in the large holes on the board; and a key pegs, some coloured black, some white, are for providing feedback on the guessed code placed in the small holes on the board. Played between two players in a board game. one player becomes the codemaker, the other the codebreaker. The codemaker chooses a code, a pattern of four code marbles. Duplicates are allowed depending on player choice, so the player could even choose four code marbles of the same colour. The chosen code is placed in the four large holes covered by the shield, visible to the codemaker but not to the codebreaker. The codebreakertries to guess the code, in both order and colour, within a certain number of attempts (e.g., 10 in the picture above). Each guess is made by placing a row of code marbles on the decoding board. Once placed, the codemaker provides feedback by placing from zero to four key pegs in the small holes of the row next to the guess. A black key peg is placed for each code marble from the guess which is correct in both colour and position. Awhite key peg indicates the existence of a correct colour code marble placed in the wrong position. If there are duplicate colours in the guess, they cannot all be awarded a key peg unless they correspond to the same number of duplicate colours in the hidden code. For example, if the hidden code is white-white-blackblack and the player guesses white-whitewhiteblack, the codemaker will award two black key pegs for the two correct whites, nothing forthe third white as there is not a third white in the code, and a black key peg for the black. No indication is given ofthe fact that the code also includes a second black. Once feedback is provided, anotherguess is made by the codebreaker; guesses and feedback continue to alternate until either the codebreaker guesses correctly, or the number of incorrect guesses reach the number of attempts allowed. If the code is not guessed correctly within th number of attempts allowed, then the shield is uncovered to reveal the code. The following video clip may be also helpful to understand the concept: htt 5: www. outube.com watch?v=wsYPsrzCKiA The Assignment Task Specification C] 5 Name Score Games Average Alan 25 3 B 3 Steve 15 2 7 5 Elon D 0 0 0 What would you like to do? (r) register a new user (3) ShOW the score board (pi play a game (q) quit Thank you for playing the World of Mastermind! Additional Req uirements The aim of the assignment is to allow you to practise creating an object-oriented design and implementing it in Python using obiectoriented programming concepts such as abstraction, encapsulation, class inheritance, polymorphism. In this first part of the assignment, you will need to develop a class design using UML class diagrams in UMLet based on the requirements above and in the remainder of this specication. The focus ofthe assignment is on identifying classes and applying appropriate relationships between the classes. The UMLcIass diagram MUST include all necessary classes. attributes and methods, and all relationships between classes. Also, visibility, data types, and cardinalitles must be specied in detail. 8 When designing the UML class diagram, you must keep in mind that the design is going to be implemented in the second part of the assignment. The UML design should be designed in such a way that code is reused and can be extended easily. Your design must presume the following Python code will run the application software you developed: worn = WorldOfMastermindli wom.run(l Think of how this run ( ) method will be the starting point and call methods of other obje system to identify classes, their methods and attributes, and their relationships based on assignment task specification. While more detailed instructions on implementation will be provided with the specificatio 2 of this Assignment, the description in this document should provide enough details for des the UML class diagram. However, if you have any doubt or question while developing the UML class diagram, please Contact the Course Coordinator for clarication through either online forum on the E C] Once everyone either breaks the code or uses up the number of attempts allowed, the game finishes with showing the results with the points each user receives. Note that the computer players don't receive any points. Each user receives points according to the number of attempts left after breaking the code. In addition, users also get points for the number of attempts made by the next playerfor whom s/he set the code for. For example, in a game with 10 attempts allowed, if player #1 broke the code after 3 attempts and player #2 broke the code afterS attempts, player #1 will receive 10 - 3 = 7 points for breaking the code, and also 9 points for making the code for player #2. Afterthe game results are printed, it goes back to the main menu. Users can check the score board to keep track of the scores after playing games. The score include the list of all registered users with their details, including their name, the current points). the number of games played, and the average points gained per game (Le. the cu divided by the number of games played, rounded up to one digit under decimal point). N computer player is not a user, hence it will not Show up on the score board. What would you like to do? (r) register a new user C] 2 What is the name of player #1? > Bill Invalid user name. What is the name of player #1? > Alan What is the name of player #2? > Alan Alan is already in the game. What is the name of player #2? > 331.9000 How many attempts will be allowed for each player (5-10]? > 5 After it's all set, the game will start. The game is played in a round-robin manner where each player takes a turn. First, each playerwill take a turn to make a code for the next player who has to break it. Think of it as if each player has a decoding board, and each player sets the code hidden behind the shield for the next player if it were in an actual board game. For example, if there are three players, first player sets the code forthe second playerto break, the second player sets the code for the third player, and the third player sets the code for the first player. To set the code, users will enter a string of four characters, each character representing a colour that consists the code. The characters representing colours are, 'R' for red, '5' for green, '5' for blue, "r" for yellow, 'W' for White, and 'K' for black. For example, 'RGBK' will be a code of red, green, blue, and black. If the code entered is invalid (Le. either not having four colours or including any invalid colour) an error message is printed and asked for entering the code again. Ifthe player in tu rn is a computer, it will generate a random code. * Alan's turn to set the code for HALQOOO to break. Please enter the code: > BTWRA Invalid code. It must be exactly four characters. each can be R, 6: Bi Y. W. or K. Please enter the code: > BYWR The code is now set for HALQOOO to break. * HALQOOO'S turn to set the code for Alan to break. The code is now set for Alan to break. Once all of the players took turn to set the code for the next player, players take turns to guess the code set for him/her/itself. In each turn, a summary of previous attempts of the player taking the turn is shown on the screen. Users are then asked to enter their guess, while the computer players will randomly generate its guess and print it on the screen. The feedback on a guess is automatically provided by the system. Ifa player breaks the code (i.e., gives the correct code) the game continues with the rest of the players until everyone either succeeds to break the code or fails by using up all the number of attempts allowed. * Alan's turn to guess the code. Previous attempts: 0 Attempts left: 5 Please enter the code: > BGY Invalid code. It must be exactly four characters, each can be R, G, B, Y, W, or K. Please enter the code: > BGYY Feedback: K * HALQOOO'S turn to guess the code. Previous attempts: O Attempts left: 5 HALQOOD's guess: BRWG Feedback: K K W * Alan's turn to guess the code. Previous attempts: 1 C]