” MCD4720程序 写作、 辅导data留学生程序、C++程序设计Foundations of C++Assignments 2 and 3 Pairs Card GameMCD4720 – Fundamentals of C++Assignment 2 and 3 – Trimester 2, 2020Assignment SubmissionsThis project will be submitted in two parts. Both parts of the assessment are equally important forthe successful completion of your project, so it is essential that you understand the requirementsof both parts before you start. Assignment 2: Farkle (Part A: Project Plan)Due Date: August 1, 2020, August 8, 2020, 11:55PM (Week 6.2)Marks: This assignment will be marked out of 100 points.Weighting: 10% of your final mark for the unit.This Assignment is the first part of a larger project, which you will complete in Assignment3. This task consists of your project planning documentation. It will include details of therequirements analysis of your program, including UML Class diagrams.The purpose of this assignment is to get you comfortable with planning a C++ programmingproject for Assignment 3. The task is detailed later in this assignment specification, as arethe specific marks allocation. Assignment 3: Farkle (Part B: C++ Project Implementation)Due Date: September 4, 2020, 11:55PM (Week 10)Marks: This assignment will be marked out of 100 points.Weighting: 20% of your final mark for the unit.This assignment consists of your implementation of your project, as outlined in your ProjectPlanning document (Assignment 2).Your project must follow your project plan and must be submitted as a Visual Studio project,including all header and .cpp files, and any appropriate text files to ensure the programcompiles and runs.This assignment consists of one Application file and associated custom Class files. Thepurpose of this Assignment is to get you comfortable with designing and implementing basicmulti-class C++ programs. The task is detailed later in this assignment specification, as arethe specific marks allocation.MCD4720作业 写作、 辅导data留学生作业Foundations of C++Assignments 2 and 3 Pairs Card GameLate submission: By submitting a Special Consideration Form or visit this link: httpss://lms.monashcollege.edu.au/course/view.php?id=1331 Or, without special consideration, you lose 5 marks per day that you submit late (includingweekends). Submissions will not be accepted more than 10 days late.This means that if you got Y marks, only (Y-n5) will be counted where n is the number of daysyou submit late.Marks: This assignment will be marked out of 100 points, and count for 10% of your total unit marks.Plagiarism: It is an academic requirement that the work You submit be original. If there is any evidence of copying(including from online sources Without proper attribution), collaboration, pasting from websites or textbooks, Zeromarks may be awarded for the whole assignment, The unit or you may be suspended or excluded from your course.Monash Colleges policies on plagiarism, collusion, and cheating are available here or see this link: httpss://www.monashcollege.edu.au/__data/assets/pdf_file/0010/17101/dip-assessment-policy.pdfFurther Note: When you are asked to use Internet resources to answer a question, this does not mean copy-pastingtext from websites. Write answers in your own words such that your understanding of the answer is evident.Acknowledge any sources by Citing them.3Foundations of C++Assignments 2 and 3 Pairs Card GameSubmission Instructions:This project will be submitted in two parts: Assignment 2 Part A: consists of your project planning documentation.This document will include an outline of your program structure and UML Class diagrams.The assignment must be created and submitted as a single Word or PDF document to theMoodle site. This document must clearly identify both your Name and Student ID to facilitateease of assessment and feedback.Your document File MUST be named as follows:YourFistNameLastName_A2.docx or YourFistNameLastName_A2.pdf.This file must be submitted via the Moodle assignment submission page.The document should contain the project plan and the UML diagrams. You can use MicrosoftVisio to draw the UML diagrams or you can use any other software, provided that thediagrams are included in your submitted document.Explicit assessment criteria are provided, however please note you will also be assessed onthe following broad criteria: Detail of a proposed project plan for the overall project. Creating accurate and complete UML diagrams. Applying a solid Object-Oriented Design (OOD) for the overall project Using appropriate naming conventions, following the unit Programming Style Guide. Assignment 3 Part B: consists of your implementation of your game project.Your project must follow your project plan and must be submitted as a Visual Studio project,including all header and code files, and any appropriate text files to ensure the programcompiles and runs.You may complete the tasks in your preferred IDE, however you MUST create a VisualStudio project in order to submit. Your project folder must be identified by using your nameand assignment number, such as YourFirstNameLastNameID_A3.The entire project folder must then be zipped up into one zip file for submission. The zip fileMUST be named YourFistNameLastName_A3.zip. This zip file must be submitted via theMoodle assignment submission page.Explicit assessment criteria are provided, however please note you will also be assessed onthe following broad criteria: Meeting functional requirements as described in the assignment description Demonstrating a solid understanding of C++ concepts, including good practice Demonstrating an understanding of specific C++ concepts relating to the assignmenttasks, including Object-oriented design and implementation and the use of Pointers Following the unit Programming Style Guide Creating solutions that are as efficient and extensible as possible Reflecting on the appropriateness of your implemented design and meeting functionalrequirements as described in the assignment description4Foundations of C++Assignments 2 and 3 Pairs Card GameNOTE! Your submitted program MUST compile and run. Any submission thatdoes not compile will automatically awarded a 50 marks penalty. Thismeans it is your responsibility to continually compile and test yourcode as you build it.NOTE! Your Submitted files must be correctly identified and submitted(as described above). Any submission that does not comply will receivean automatic 20 marks penalty (applied after marking). For assignment 3,your Visual Studio Project should include all .cpp and .h files.If you have any questions or concerns please contact your tutor as soon as possible.5Foundations of C++Assignments 2 and 3 Pairs Card GameAssignment 2: Farkle (Part A)You are to implement a computer-based variant of the dice game Farkle. This is a dice game forany number of players. Each player is racing to reach a target score by removing scoringcombinations of dice from a set of 6 dice. The first player to reach or exceed the target score isdeclared the Winner! Any number of players may play, however, for the basic assignment youonly need to implement one.You can watch a video on how to play here: httpss://www.youtube.com/watch?v=jBKdOF9tuog oreven play an online version here: https://www.playonlinedicegames.com/farkleIn your version, for the basic assignment you only need to implement a 1-player game.For Assignment 2 (Part A) of the assignment you will focus on the planning of the project. In PartB you will focus on creating the various interactive objects in the game and program the playerinteractions.Basic Game Play:In this program, you will control a set of six dice. On your turn, you must make as many scoringcombinations (as outlined below) as you wish to score points towards the winning target score.The basic game play is as follows: One player is playing with themselves each time must track their own score and display theirname and game score when required On your turn: Roll all six dice and set aside at least one die of a scoring value, (as shown below): Noteyou should follow the below scoring guidelines even the YouTube and the online gamesaid something else.Combinations Only count when made in a single throw. You may now decide whether to score your points and end your turn or you can re-rollthe remaining dice.If you choose to Roll again, you can keep rolling the dice, until you choose to stop or youroll no scoring values. Rolling no scoring values is called a FARKLE.If you roll a FARKLE, you score NO POINTS for this round and your turn ends. Pass thedice to the next player.If you set aside all 6 dice, you may re-roll all 6 dice and continue adding to your score,following all the rules above. The first player to score 10,000 or more points wins the game. However, for this assignmentset a 5,000-point target score.There are many variations to this basic game, some of which you will be able to implement aspart of the extra functionality for your assignment.Optional Rule6Foundations of C++Assignments 2 and 3 Pairs Card GameA Typical Player Turn:During a players turn, the logic is as follows:1) First, the player must roll all 6 dice to produce 6 random numbers from 1-6.2) Next, they set aside at least one die that scores points (a single 1 or 5, or 3-of-a-kind). Thepoints for which are stored in a running total for the players turn. These dice cannot be rolledagain, until after All 6 dice are set aside (see Step 4).3) The player is presented with 2 options roll the dice or score their points.If they choose to Score, the running total is added to their player score and their turn ends.If they roll again, only those dice not set aside are rolled. Steps 2 and 3 may be repeated asoften as the player wishes, until they use all 6 dice (Step 4) or roll a Farkle (Step 5).4) If the player sets aside all 6 dice, they may choose to start again with all 6 dice and continuescoring as before. Steps 2 and 3 may be repeated as often as the player wishes.5) A Farkle is a roll with no scoring values the player cannot take a single 1 or 5, or 3-of-akind.When this happens, the player ends their turn immediately and does not score thepoints rolled during that turn. Their saved score is not changed.Here is an example roll for a players turn: On their first roll, the player rolls a 1, 2, 3, 3, 5, 5. They can score 100 points for the 1, or 100 points for both the 5s, or 50 points for 1 of the5s, or 200 points for the 1 and both 5s. They choose to set aside just the 1 for 100 points and roll the 5 remaining dice again. This time they roll a 2, 3, 6, 6, 6. They decide to take the 600 points for the 3-of-a-kind in 6s. Their running total is now 700 points. This is a good score so they opt to save their pointsand end their turn.Project PlanHaving a clear Pan for your project before you begin coding is essential for finishing a successfulproject on time and with minimal stress. So part of this assignment is defining what will be in yourproject and what you need to do to actually develop it.Important: You must also read the requirements for Assignment 3 in order to be able tocomplete the documentation required for Assignment 2.The documentation you must submit will include the following: A description of How to PlayThis will be the information you display on the opening screen of your game to inform the playerwhat they need to do in order to play and win the game. Do not just copy the game playdescription above, make your own description.Note: This description must be saved as a text file and read into your game when the programbegins. You can also use this as a convenient way to display help if the player asks for it.7Foundations of C++Assignments 2 and 3 Pairs Card Game A development outline of your gameUsing a simple Outline format (numbered or bullet points) state the main actions that theprogram will have and then, as sub-points, state the things you will need to do to make thathappen.The outline structure should contain all the elements of your game, as this is a high leveldescription of your approach to the development of your program. You should include at leastthe following headings and provide examples of happens under each section. The game Setup (everything that happens before the game starts) The players turn (the sequence of events that happen during a turn) Processing player input (include each of the commands your player can use) Providing feedback to the player (in response to the players interactions) The end game conditions (include all win and lose conditions) Additional Features included, if any see Assignment 3 Outline the functionality of all your game classes see Assignment 3Here is an example to get you started with your project outline:o The Game Setup Display an overview of the game rule so the player knows what to do to win. read this information from a text file Initialise the game elements: add the player ask for the players name, set default variables all the other things that will happen during initialisation including creating the game board initialising other game variables (list them here)As you can see, you Only have to describe the actions the program will take, not the code, forthe outline. The idea here is to give you a starting point for when you start writing your code asyou can use this as a checklist of the things you need to include. UML DiagramsUML diagrams are designed to make structuring your program easier.How to create them will be covered in class, but the general structure isshown here See Assignment 3 for more details about classes.You will need UML diagrams for each of the classes you include in yourgame at least a Player, Board and Application (main) class.ClassNamelist of attributes(variables)list of behaviours(functions)8Foundations of C++Assignments 2 and 3 Pairs Card GameAssignment 2: Marking Criteria [100 marks in total]1. Requirements and Analysis Document (Project Plan) [80]1.1. Description of the rules (the introduction to your game) [8]1.2. Outline includes all game functionality (from Part B) [12]1.3. Each section is broken into logical tasks [15]1.4. Tasks are performed in a logical order [15]1.5. Task descriptions given provide sufficient detail [30]2. UML Diagrams [20]2.1. Correct structure used (Name, Attributes, Behaviours) [4]2.2. Included the correct designations for public (+) and private (-) data [8]2.3. All variables and functions have meaningful names [8]Assignment 3: Farkle (Part B)You are to implement The Farkle dice game you started in Assignment 2 by creating a VisualStudio Project Using your project plan as described in your previous submission.Your completed Farkle dice game must demonstrate the following: You MUST implement your program using the following classes, as a minimum, you mayinclude more (as appropriate for your game design): Player class: holds a players details including their name, score and turns taken. Die class: holds the current die value, a visual representation of the die and whether itcan be rolled (or not). Application file: holds the main() function and controls the overall flow of the game.You may include other relevant attributes and behaviours to these classes, as identified inyour project plan. The Player must be able to do the following: assign a name which is requested at the start of the game and used in the feedback given choose to roll or score the dice rolled and see appropriate feedback as a result continue rolling dice until they win or lose the game a win = reaching or exceeding 5,000 points a loss = rolling 3 Farkles in a row quit the game at any time during or after a game The Dice in the Game should have the following characteristics: be set to a random number from 1 to 6 with each roll if the die is selected, it should be locked and unable to roll again be able to reset the die value to 0 at the end of a turn when the player scores their points display a rolled value and a locked version (eg: [1] = a rolled 1 and [x] = a locked die)9Foundations of C++Assignments 2 and 3 Pairs Card Game The Game Application must do the following: display the how to play information at the start of the game create a player and a set of 6 dice display an Appropriate and uncluttered user interface providing relevant information to theplayer at all times ask for and allow the player enter an option to roll the dice or score the points ask for and allow the player to select one or more of the rolled dice display the updated dice after each roll entered by the player terminate the game (player wins) when the player has reached or passed the target terminate the game (player loses) when the player has rolled 3 Farkles in a row provide player stats at the end of the game (wins, loses and score) the player should be able to QUIT the game at any timeProgram ReflectionYou must also provide a 300-word written reflection of your object-oriented design and how wellyou believe it was to implement. You should cover the following areas: Discuss why you designed it the way you did. Why did you create your classes that way? How does this reflect an OO design or approach? Discuss how well you were able to code it Highlight any issues you found once you tried to implement your design. How did you Resolve these issues? If you were to do this project again, discuss how you might change your design to make yoursolution easier to implement, more efficient, or better for code reuse.This must be a Word or PDF document which must be included in the same folder as your *.slnfile. Your document file MUST be named as follows:A3-YourFistNameLastName.docx or A3-YourFistNameLastName.pdf.Extra FunctionalityThe marking criteria indicates that you should make some individual additions to this in orderto achieve the final 20% of the mark.Following is a list of additional features you can include, with the maximum number of marks[x] you can earn for each one. You may implement one or more features from the list, but youwill only score up to the maximum of 20% of the total assignment marks or 20 marks.You should aim to add some additional creative elements to the gameplay, as well asadvanced object-oriented design elements or advanced use of pointers. The player selects a skill level (eg: Rookie, Roller and High Roller) which modifies the gameparameters the Target score (5,000, 10,000 and 20,000) and the minimum points requiredto roll before saving points (250, 500 and 750 respectivaly), etc. [5] If a player rolls three Farkles in a row (on three consecutive turns) they lose 1000 pointsfrom their saved Score (can go negative). Once they lose the points the counter for Farklesis reset to zero. If a single player then rolling 3 Farkles in a row will lose the game if theirscore becomes negative. [2] Include multiple human players making the game playable by 1 to 4 people. At the beginningof the game the player order must be randomised. Each player must track their own score10Foundations of C++Assignments 2 and 3 Pairs Card Gameand display their name and game score when required. One player is randomly chosen togo first. Players take turns in clockwise order. The game is played in rounds in which eachplayer has a turn to roll the dice and score points. [10] Display the dice using ASCII art, showing the faces as pips not as numbers. [5] Allow the game To be saved and restored at the players request. [5] Ask the player if they want to be promoted to the next skill level after winning 5 games. Ifthey accept their skill level is increased by one (to the maximum level permitted in yourgame). Also, if the player loses 5 games in a row they are automatically demoted one skilllevel (to the minimum level permitted in your game). [5] When the first player reaches or exceeds the target score, all other players (in a multi-playergame) have one final turn to try and beat that score. In this case, the player at the end ofthe round with the highest score wins. [5] Allow the game to be played with computer players. The computer player should be able tomake reasonably intelligent decisions for choosing scoring combinations and when to savetheir points. This AI can be a set of rules that the computer player checks before making aroll or when to save their score. On a computer players turn, the process should beautomated so that the human player can watch the results. [10] Implement a more sophisticated AI for the computer players. You may create different playertypes, each with their Own strategies for playing, such as an easy player, a cautious player,an aggressive player, etc. The human player should be able to select the level of difficultyand number of their opponents at the beginning of the game. [10]You certainly do not have to implement all of the above to earn marks for extra functionality. Justremember the maximum number of marks you can earn are given in [x]. It is up to you!Assignment 3: Marking Criteria [up to 100 marks in total]Does the program Compile and run? Yes or No50 marks penalty will be applied for a non-compiling program.1. Class Design [15]1.1. Player Class [5]1.1.1. Has an appropriate header file [2]1.1.2. Required data members and member functions using meaningful names [1]1.1.3. Contains only aspects that relate to a player (has no data members ormember functions that are not directly related to a Player) [2]1.2. Die Class [5]1.2.1. Has an appropriate header file [2]1.2.2. Required data members and member functions using meaningful names [1]1.2.3. Contains only aspects that relate to a board (has no data members ormember functions that are not directly related to the board) [2]1.3. Game Application [5]1.3.1. Has an appropriate header file [2]1.3.2. Has appropriate variables and functions using meaningful names [2]1.3.3. The main()Function has appropriate function calls to keep it uncluttered [1]11Foundations of C++Assignments 2 and 3 Pairs Card Game2. Functionality [35]2.1. Game set up: initialising the player, game variables and creating a collection of dice[5]2.2. Implementation Of a clear and uncluttered User Interface display [5]2.3. Implementation of the basic game mechanics (roll and score) [5]2.4. Implementation of basic scoring combinations (as shown on table) [5]2.5. Implementation score tracking and updating as required [5]2.6. Successful implementation of action processes and feedback displayed to theplayer [5]2.7. Appropriate end game conditions triggered [5]3. Quality of Solution and Code [20]3.1. Does the program perform the functionality in an efficient and extensible manner?[12]3.1.1. Appropriate use of functions and function calls [1]3.1.2. Appropriate use of data types [1]3.1.3. Appropriate use of decisions, loops and other programming techniques [2]3.1.4. Appropriate use of references and/or pointers [5]3.1.5. Appropriate use of good programming practices and techniques [2]3.1.6. Extraneous and redundant code removed [1]3.2. Has a well-designed OO program been implemented? [4]3.2.1. Contains classes appropriate to the assignment brief [3]3.2.2. Program Structures support and OO design [1]3.3. Has the Programming Style Guide been followed appropriately? [4]3.3.1. Appropriate commenting and code documentation [2]3.3.2. Correct formatting of code within *.h and *.cpp files [2]4. Extra Functionality [20]4.1. Implement difficulty levels which may be selected by the player [5]4.2. Rolling 3 Farkles in a row (on three consecutive turns) lose 1000 points [2]4.3. Include multiple human players making the game playable by 1 to 4 people [10]4.4. Display the dice using ASCII art, showing the faces as pips not as numbers [5]4.5. Allow the game to Be saved and restored at the players request [5]4.6. Ask the player if they want to be promoted to the next skill level after winning 5games [5]4.7. All players (in a multi-player game) have an equal number of turns [5]4.8. Allow the game to be played with computer players [10]4.9. Implement a more sophisticated AI for the computer players [10]5. Reflection [10]5.1. Discussion of motivations for the program design [3]5.2. Discussion of how well the design was to implement [3]5.3. Discussion of what they would do differently if they were to start it again [4]12Foundations of C++Assignments 2 and 3 Pairs Card GameAssignment Notes:It is your responsibility to know what is expected of you. If you are unsure about anything, askyour tutor Sooner rather than later. Write any questions and/or notes here to help you clarify whatyou have to do.Note: Your tutor May ask you to program part of your assignment in classto determine that you have completed the work yourself. Failure to do thisto an acceptable level will result in you being referred to the SubjectLeader for plagiarism.In-Class interviews: Also, you may be required to demonstrate your codeto your tutor after the submission deadline. Failure to demonstrate willlead to zero marks being awarded to the entire assignment.Note: Submitting only .sln file, a zero mark will be granted.13Foundations of C++Assignments 2 and 3 Pairs Card GameHere are some sample screen shots to help you develop your user interface:Sample Screenshots to give you some ideas for your layout and interface design.This shot shows the rolleddice and the locked die theplayer selected on their lastroll. The dice values are inthe [ ] to make them standout from the selection ones.Data validation is used toensure the player entersonly the Correct data.Displaying information tothe player is Important.This shot shows playerssaved total, running totaland how many dice to roll.Note the use of promptmessages to help theplayer know what to do.This shot shows the rolled dice usingASCII art to display the dice, as analternative to the above interface.Using this type of display will requireputting some effort into formatting theindividual dice faces then combiningthem into a suitable display.The selection of the dice is the same asin the above example.To score Full Marks for this extra youmust display the dice across the screen,not down the screen below each other.14Foundations of C++Assignments 2 and 3 Pairs Card GameThis shot shows theplayers saved score anddisplays their next roll.Selecting the dice is aseasy as typing in thenumber of the requireddice then processing eachcharacter in the string tocalculate the playersrunning total, based onthe scoring system youhave implemented.This shot shows theplayer Has rolled andscored all 6 dice so hasthe option To continuerolling with 6 dice.This shot shows the rolleddice, all locked dice andthat the player did not rollany scoring values theyFarkled!This ends their turn andthey do not score anypoints they lose theircurrent running total (inthis case 1500 points this is what happens whenyou get greedy).如有需要,请加QQ:99515681 或邮箱:99515681@qq.com
“
添加老师微信回复‘’官网 辅导‘’获取专业老师帮助,或点击联系老师1对1在线指导。