Foundations of C++ Assignments 2 and 3
MCD4720 – Fundamentals of C++
Assignment 2 and 3 – Trimester 1, 2022
Assignment Submissions
Copyright By PowCoder代写 加微信 powcoder
This project will be submitted in two parts. Both parts of the assessment are equally important for the successful completion of your project, so it is essential that you understand the requirements of both parts before you start.
Assignment 2: Hunt the Wumpus (Part A: Project Plan) Due Date: April 8, 2022, 11:55PM (Week 7)
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 Assignment 3. This task consists of your project planning documentation. It will include details of the requirements & analysis of your program, including UML Class diagrams.
The purpose of this assignment is to get you comfortable with planning a C++ programming project for Assignment 3. The task is detailed later in this assignment specification, as are the specific marks allocation.
Assignment 3: Hunt the Wumpus (Part B: C++ Project Implementation) Due Date: May 6, 2022, 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 Project Planning 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 program compiles and runs.
This assignment consists of one Application file and associated custom Class files. The purpose of this assignment is to get you comfortable with designing and implementing basic multi-class C++ programs. The task is detailed later in this assignment specification, as are the specific marks allocation.
Foundations of C++ Assignments 2 and 3
Late submission:
• By submitting a Special Consideration Form or visit this link: https://lms.monashcollege.edu.au/course/view.php?id=1331
• Or, without special consideration, you lose 5 marks of your mark per day that you submit late (including weekends). Submissions will not be accepted more than 5 days late. This means that if you got Y marks, only Y-n*5 will be counted where n is the number of days you submit late.
• Assessment items will not be accepted after more than 14 calendar days unless a Special Consideration application has been approved. This 14-day time frame does not apply to assessments due in Week 12.
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, Zero marks 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: https://www.monashcollege.edu.au/__data/assets/pdf_file/0010/17101/dip-assessment-policy.pdf
Further Note: When you are asked to use Internet resources to answer a question, this does not mean copy-pasting text from websites. Write answers in your own words such that your understanding of the answer is evident. Acknowledge any sources by citing them.
Foundations of C++ Assignments 2 and 3
Submission 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 the Moodle site. This document must clearly identify both your Name and Student ID to facilitate ease of assessment and feedback.
Your document file MUST be named as follows: “YourFirstNameLastNameID_A2.docx” or “YourFirstNameLastNameID_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 Microsoft Visio to draw the UML diagrams or you can use any other software, provided that the diagrams are included in your submitted document.
Explicit assessment criteria are provided, however please note you will also be assessed on the 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 program compiles and runs.
You may complete the tasks in your preferred IDE, however you MUST create a Visual Studio project in order to submit. Your project folder must be identified by using your name and assignment number, such as YourFirstNameLastNameID_A3.
The entire project folder must then be zipped up into one zip file for submission. The zip file MUST be named “YourFistNameLastName_A3.zip”. This zip file must be submitted via the Moodle assignment submission page.
Explicit assessment criteria are provided, however please note you will also be assessed on the 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 assignment
tasks, 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 functional
requirements as described in the assignment description
Foundations of C++ Assignments 2 and 3
NOTE! Your submitted program MUST compile and run. Any submission that
does not compile will automatically awarded a 50 marks penalty. This
means it is your responsibility to continually compile and test your
code as you build it.
NOTE! Your submitted files must be correctly identified and submitted
(as described above). Any submission that does not comply will receive
an 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.
Foundations of C++ Assignments 2 and 3
Assignment 2: Hunt the Wumpus (Part A)
In this assignment, you are to write an action adventure game, where your hero character will set out to find and kill the notorious Wumpus in a complex of caverns. You must use your powers of deduction and stealth to sneak up on the location of the Wumpus because no-one come face to face with a Wumpus and lives!
For Part A of the assignment you will focus on the planning of the project. In Part B you will focus on creating the various interactive objects in the game and program the player interactions.
“Well met, young adventurer and welcome to the peaceful realm of Silven Valley. Actually, it used to be peaceful until the Wumpus, a vile creature, took up residence in caverns nearby. It has been terrorising the villages all along the valley for a long time now.
So, the elders from the villages have banded together to offer fame and fortune to the worthy adventurer who will rid their valley of this dreaded monster! You have answered the call and have been told by the elders that the creature is lurking in one of the cavern complexes in the surrounding hills.
All you have to do is find the creature and slay it … simple! Good luck!! You’ll need it!”
Basic Game Play
The Wumpus lives in an underground cavern consisting of 20 smaller caves. Each cave has 3 tunnels leading from it to other caves. One example of a cavern complex is shown here (like a squashed dodecahedron).
Besides the Wumpus, there are several other hazards that could be fatal. These include two caves with bottomless pits – if you happen to go into them, you fall into the pit (and lose). Two other caves have super bats – if you stumble in them, you are immediately carried away by the bats and left in a random cave (would be annoying to say the least).
The Wumpus, on the other hand, is not bothered by these hazards (he has sucker feet and is too big for the bats to lift). It is usually asleep, only waking up if you blunder into its lair or if your shot goes astray (clattering weapons do echo quite loudly underground). If you do manage to wake a Wumpus there is a 75% chance that it will move to an adjoining cave or it may decide (25% chance) to go back to sleep where it is. If it moves to the same cave you are in … you become lunch (and you lose).
When entering the caverns, you have a map, a lantern that has a limited amount of oil which also sets the number of turns you have (starts with 100), and you are armed with a bow and 5 arrows. Each turn, you may move to an adjacent cave, using one of the 4 standard compass directions [N, S, E, W] (which also reduces your lantern oil) or shoot an arrow into a cave [shoot] (hopefully hitting the Wumpus and killing it).
Your lantern oil will be reduced by a random value between 2 and 4 when you move or shoot. Also, we can look at the location of the Wumpus, pits and super bats by little bit cheating.
Foundations of C++ Assignments 2 and 3
WN S EN WN EN
WN EN WN EN EEE
EN Figure 1: Map (Top-Bottom Left-Right)
When you enter a new cave, if you are one cave away from the Wumpus or a hazard, you will be given a clue indicating what is in one (or potentially more) of the caves leading from your current location but not the direction in which it lies.
Bottomless Pits: they tend to be drifty, very deep and easy to fall into! They will just kill you outright, should you fall into one. So, watch your step!
Super Bats: a colony of these bats makes an awful racket and are very protective of their domain. If you happen to wander into their cave, they’ll swam you and carry you off to some random cave within the caverns.
Wumpus: a nasty beast that smells really dreadful and sleeps a lot. If it’s awake and you’re in the same cave then you’re its lunch … a truly horrible way to die. The Wumpus is not bothered by pits or bats so is free to roam anywhere in the caverns.
Foundations of C++ Assignments 2 and 3
End game conditions
You win if you successfully shoot the Wumpus.
You lose if your lantern runs out of oil, or you run out of arrows, or you fall into a pit, or you
end up in the same cave as the Wumpus. You should try to avoid these things!
Note: The theme of the game can be any setting you like, so long as the main element equivalents (Wumpus and hazards, limited turns, and resources) and general game play as described above are present.
You should include a title and a brief description of the caves to make the game interesting and engaging for the player. You may use the techniques you developed in the first assignment to load and display this data.
Project Plan
Having a clear plan for your project before you begin coding is essential for finishing a successful project on time and with minimal stress. So, part of this assignment is defining what will be in your project 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 to complete the documentation required for Assignment 2.
The documentation you must submit will include the following:
✓ A description of “How to Play”
This will be the information you display on the opening screen of your game to inform the player what they need to do in order to play and win the game. Do not just copy the game play description above, make your own description.
Note: This description must be saved as a text file and read into your game when the program begins. You can also use this as a convenient way to display “help” if the player asks for it.
✓ A development outline of your game
Using a simple outline format (numbered or bullet points) state the main actions that the program will have and then, as sub-points, state the things you will need to do to make that happen.
The outline structure should contain all the elements of your game, as this is a high-level description of your approach to the development of your program. You should include at least the following headings and provide examples of happens under each section.
The game setup (everything that happens before the game starts)
The player’s 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 player’s 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 3
Here 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 7
Foundations of C++ Assignments 2 and 3
Initialise the game elements:
▪ add the player – ask for the player’s name, set default variables ▪ all the other things that will happen during initialisation including
• creating the hazards and the game world
• 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, for the outline. The idea here is to give you a starting point for when you start writing your code as you can use this as a checklist of the things you need to include.
✓ UML Diagrams
UML diagrams are designed to make structuring your program easier. How to create them will be covered in class, but the general structure is shown here – see Assignment 3 for more details about classes.
You will need UML diagrams for each of the classes you include in your game – at least a Player, Location and Application (main) class.
✓ Map of Your Game Environment
list of attributes (variables)
list of behaviours (functions)
In order to make marking easier for your tutors, please include a map of your game environment. This can be hand drawn or created in another application (PowerPoint has a range of shapes and connectors that make mapping easy). See example below.
Figure2: A sample map that you would include in
your documentation
Foundations of C++ Assignments 2 and 3
Assignment 2: Marking Criteria [100 marks in total]
1. Requirements and Analysis Document (Project Plan) [70]
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 [20]
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]
3. ReportStructure[10]
3.1. Title page [1]
3.2. Table of Contents [1]
3.3. Page number [1]
3.4. References and in text citations [2]
3.5. Grammar punctuation and spelling [2]
3.6. Overall structure (layout), presentation and formatting [3]
Foundations of C++ Assignments 2 and 3
Assignment 3: Hunt the Wumpus (Part B)
You are to implement the Hunt the Wumpus game you started in Assignment 2 by creating a Visual Studio Project using your project plan as described in your previous submission.
Your completed Hunt the Wumpus game must demonstrate the following:
✓ You MUST implement your program using the following classes, as a minimum, you may include more (as appropriate for your game design):
Player class: holds the player’s details including their name and the equipment they are carrying (arrows, lantern [turns], map, etc.).
Location class: holds details of the various locations in game including a description, exits, and whether it has a hazard or not (you can call it whatever is appropriate for your game – Cavern, Cave, Room, etc.)
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 in
your 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 assign the player’s initial attributes to the required values (as stated in the brief)
update and display the player’s statistics (stats) during the game
explore the game locations using the compass directions: N, S, E, W
shoot arrows at the Wumpus: shoot
look at the locations of Wumpus, pits and super bats at any time: cheat quit the game at any time (during or after a game): QUIT
✓ The Locations must be able to do the following:
be loaded from a text file and stored appropriately at the start of the game
assign a name and initialise attributes (as stated in the brief)
access and display data about a hazard if it is in the location
display all appropriate information when the player enters it (name or number, description,
exits, other information if required)
✓ The Game Application must do the following:
display the “how to play” information at the start of the game
initialise both the player and the hazards with appropriate attributes/behaviours
display an appropriate and uncluttered user interface providing relevant information to the
player at all times
allow the player to explore the locations of the caverns using compass directions
display the information about each location as it is entered (name, direction of exits, etc.)
terminate the game (player wins) when the player has killed the Wumpus
terminate the game (player loses) when the player has run out of oil in their lantern (turns)
or arrows, or is eaten by the Wumpus
provide player stats at the end of the game (success or failure, inventory, etc.)
the player should be able to QUIT the game at any time
Foundations of C++ Assignments 2 and 3
Program Reflection
You must also provide a 300-word written reflection of your object-oriented design and how well you 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 your solution 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 *.sln file. Your document file MUST be named as follows:
“YourFirstNameLastNameID_A3.docx” or “YourFirstNameLastNameID_A3.pdf”. Extra Functionality
The marking criteria indicates that you should make some individual additions to this in order to 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 you will only score up to the maximum of 20% of the total assignment marks or 20
程序代写 CS代考 加微信: powcoder QQ: 1823890830 Email: powcoder@163.com