2022/10/22 23:28 Assignment 3 – Report
Assignment 3 – Report 10 Possible Points | 2022/10/30
Attempt 1 IN PROGRESS Add Comment Next Up: Submit Assignment
Unlimited Attempts Allowed
Copyright By PowCoder代写 加微信 powcoder
2022/10/10
Problem Overview
You are required to design an application model for a pool table game. The pool game is played on a rectangular table with different colour of balls on it. This pool table has 6 pockets into which the balls can fall. All the balls are randomly placed on the table at the beginning of the game. Among all balls, there is a ball being the white cue ball. A player can only hit the white cue ball with the cue stick. If the balls approach the side of the table, they will bounce back. Balls also bounce off other balls. This is a single player game and is won when all the balls, other than the cue ball, are in the pockets. Game is lost when the white cue ball falls into any of the pockets. The score is calculated when a ball falls into a pocket. Duration of the game is clocked until all balls are in the pocket.
Q: What is a pool table game?
A: Some real-world examples could be found here (https://en.wikipedia.org/wiki/Pool_(cue_sports)) and here
(https://en.wikipedia.org/wiki/Cue_sports) .
Assignment 3 Requirement
In assignment 3, you are going to review and extend an existing implementation of ‘Pool Game’ (that is not your own) to add features, leveraging your knowledge of OOP, design principles and design patterns. Please find the detailed tasks below:
Implementation Task
What we provide to you?
Codebase: the codebase you are going to review and extend is provided here (https://canvas.sydney.edu.au/courses/44948/files/27186984?wrap=1) .
Please note that, your goal is to extend and maintain this implementation. What this means is to add features to the existing implementation by using OO design principles and appropriate design patterns you have learnt throughout this UoS, without breaking the implementation (it runs – rule #1 is don’t break working code) or using unnecessary ‘hacks’.
You are not required to correct the existing design of the implementation – you must retain the existing design wherever changes are not required and will be penalised should this be changed without cause (for example, replacing the given implementation with your own assignment 2 code). The idea here is that you work with the existing design rather than against it, and minimise required changes to the existing structure (reasonable, limited scope refactoring to support extensions is encouraged).
What we expect from you?
Your Pool Game is now expected to support the following features in the code:
Pockets and More Coloured Balls
The pool table now has pockets whose positions and radius are configurable and specified in the sample
Submit Assignment
JSON configuration files (Note that: sample JSON files could be found in the ‘Difficulty Level’ part).
https://canvas.sydney.edu.au/courses/44948/assignments/388705
2022/10/22 23:28 Assignment 3 – Report
At this stage, we consider more configurable coloured balls including red, blue, black, yellow, purple, orange, green and brown. After falling into the pocket, an orange ball and a yellow ball behave the same as a red ball (i.e., disappear immediately), a green ball and a purple ball behave the same as a blue ball (i.e., back to its initial position after the first falling whereas disappear after the second time falling into the pocket), whereas a black ball and a brown ball will be back to its initial position after the first two fallings, while disappearing after the third time falling into the pocket.
There is also now a visible player-controlled cue stick which can hit the cue ball with variable velocity.
Difficulty Level
There are now three difficulty levels in your game including easy, normal and hard, which correspond to configuration files config_easy.json (https://canvas.sydney.edu.au/courses/44948/files/27185037?wrap=1) , config_normal.json (https://canvas.sydney.edu.au/courses/44948/files/27185039?wrap=1) and config_hard.json (https://canvas.sydney.edu.au/courses/44948/files/27185038?wrap=1) , respectively.
The player can choose a level either by clicking on a button or by selecting from a menu or by clicking on a keyboard key (i.e., you ONLY need to implement this feature through one of these three ways).
You can set the easy level as the default level displayed to the player OR you can ask the player to choose a level before the start of a game.
Attention Please: you are free to change the values in the sample JSON files whereas you are not allowed to change the structure of the JSON files (i.e., no added, no deleted).
Time and Score
Duration of the game is clocked until all balls (except the cue ball) are in the pockets (i.e., game wins) or the cue ball falls into a pocket (i.e., game loses). The game must display on the screen a continually updating time (initially at 0:00).
The score is calculated when a ball falls into a pocket. The game must display on the screen an updating score (initially at 0) when a ball falls into a pocket during the level.
The ball and its corresponding score after each falling into the pocket can be found in the table:
Colour red yellow green brown blue purple black orange Score1 2 3 4 5 6 7 8
Undo and Cheat
The player can reset the game to an earlier state (including score, time, ball positions) so that a shot can be undo.
This undo functionality can be triggered by button, menu or keyboard action (i.e., you ONLY need to implement this feature through one of these three ways).
This must be a single state that is not written to disk, and the state reaching by the subsequent undo function overwrites the existing saved state.
The player can do a cheating operation to remove all same coloured ball immediately.
This functionality can be triggered by button, menu or keyboard action (i.e., you ONLY need to implement this feature through one of these three ways).
Take keyboard action as an example only: pressing the key ‘b’ on the keyboard will immediately remove all blue balls on the table at the cheating moment and add corresponding scores (i.e., 5 score X the number of blue balls on the table at the cheating moment).
Attention Please: the balls will be removed immediately rather than coming back to the table which is different from falling into a pocket (e.g., if a blue ball falls into a pocket at the first time, it will come back to the table, as what we specified in the requirement of A2).
Report Task
Your report in this assignment must concisely cover the followings:
1. Code review on the existing codebase provided to you, which includes
Submit Assignment
https://canvas.sydney.edu.au/courses/44948/assignments/388705
2022/10/22 23:28 Assignment 3 – Report
discussion on the use of OOP design principles (be specific to the given code, a UML snippet needs to be provided)
discussion on the use of design patterns (be specific to the given code, a UML snippet needs to be provided)
discussion on the documentation (e.g., readme file, comments, etc.)
discussion on how easy or difficult the given codebase and the above points made it to achieve your required functionality in this assignment and the reason
2. A discussion on your feature extension including
Describe the actual changes (including extensions) you have made in your code and rationalise that the changes are necessary
Highlight your application of OO design principles in your extensions and explain what they motivated you to do and why (be specific to your code, a UML snippet needs to be provided)
Document at least three design patterns you have used in this assignment and rationalise their usage in terms of SOLID and GRASP (be specific to your code, not the pattern in general, a UML snippet needs to be provided).
You must use the GoF design patterns that we have learnt in this unit in your implementation. Attention Please: you are allowed to reuse a design pattern that you have used in A2 however you are not allowed to document a repeat use case of a design pattern as A2, for example, you are not allowed to discuss applying builder design pattern to create balls, the same for factory method and strategy.
Reflect on your extension design, highlighting any outstanding issues or improvements or discussing your impact on the extensibility of the code
3. A UML class diagram of the after-extension version of your codebase, highlighting the design patterns you have used for your extension and identifying the participants in each design pattern you have used.
4. Any acknowledgement/reference required.
Submission Details
You are required to submit all assessment items by the due date listed on Canvas.
Report: Submit your UML class diagram and your report as a SINGLE pdf document.
If your diagram is unreadable at 200% magnification (maximum zoom with the turnitin tool) then consider how to improve it
You must include the entire UML diagram, and you must also include enlargements of specific parts for reference in the discussion
Code: Submitted separately (https://canvas.sydney.edu.au/courses/44948/assignments/388704) ‘gradle run’ will start the game.
A readme file named “A3_readme.txt” should cover any point you would like your marker to know
how to run your code (e.g., any quirks to run your application).
List which features (i.e., Pockets and More Coloured Balls, Difficulty Level, Time and Score, and Undo and Cheat) you have implemented in your extension.
List the names of the design patterns you have used in your extension and provide the corresponding class and file names regarding these patterns.
Attention Please: class and file names that are not listed here will not be assessed as part of
the design pattern.
Describe how to select difficulty level, how to undo and how to cheat in your code (i.e., what operations your maker needs to do).
Any other info you would like your marker to know regarding your implementation.
Attention Please
Submit Assignment
https://canvas.sydney.edu.au/courses/44948/assignments/388705
2022/10/22 23:28 Assignment 3 – Report
If you replace the given codebase with your own assignment 2 codebase in this assignment, you are going to be awarded 0 immediately for this whole assignment.
Academic honesty
While the University is aware that the vast majority of students and staff act ethically and honestly, it is opposed to and will not tolerate academic dishonesty or plagiarism and will treat all allegations of dishonesty seriously.
Further information on academic honesty, academic dishonesty, and the resources available to all students can be found on the academic integrity pages on the current students website: https://sydney.edu.au/students/academic- integrity.html (https://sydney.edu.au/students/academic-integrity.html) .
Further information for on research integrity and ethics for postgraduate research students and students undertaking research-focussed coursework such as Honours and capstone research projects can be also be found on the current students website: https://sydney.edu.au/students/research-integrity-ethics.html (https://sydney.edu.au/students/research-integrity-ethics.html) .
Compliance statement
In submitting this work, I acknowledge I have understood the following:
I have read and understood the University of Sydney’s Academic Honesty in Coursework Policy 2015 (https://sydney.edu.au/policies/showdoc.aspx?recnum=PDOC2012/254&RendNum=0) .
The work is substantially my own and where any parts of this work are not my own I have indicated this by acknowledging the source of those parts of the work and enclosed any quoted text in quotation marks.
The work has not previously been submitted in part or in full for assessment in another unit unless I have been given permission by my unit of study coordinator to do so.
The work will be submitted to similarity detection software (Turnitin) and a copy of the work will be retained in Turnitin’s paper repository for future similarity checking. Note: work submitted by postgraduate research students for research purposes is not added to Turnitin’s paper repository.
Engaging in plagiarism or academic dishonesty in coursework will, if detected, lead to the University commencing proceedings under the Academic Honesty in Coursework Policy 2015 (https://sydney.edu.au/policies/showdoc.aspx?recnum=PDOC2012/254&RendNum=0) and the Academic Honesty Procedures 2016 (http://sydney.edu.au/policies/default.aspx?mode=glossary&word=Academic+honesty) . Engaging in plagiarism or academic dishonesty in research-focussed work will lead to the University commencing proceedings under the Research Code of Conduct 2013 (https://sydney.edu.au/policies/showdoc.aspx? recnum=PDOC2013/321&RendNum=0) and the Academic Honesty Procedures 2016 (http://sydney.edu.au/policies/default.aspx?mode=glossary&word=Academic+honesty) .
Engaging another person to complete part or all of the submitted work will, if detected, lead to the University commencing proceedings against me for potential student misconduct under the University of Sydney (Student Discipline) Rule 2016 (http://sydney.edu.au/policies/showdoc.aspx?recnum=PDOC2017/441&RendNum=0) .
View Rubric
Submit Assignment
https://canvas.sydney.edu.au/courses/44948/assignments/388705
2022/10/22 23:28 Assignment 3 – Report
Assignment 3 Report
Criteria Ratings Pts
view longer description
Full Marks
A solid discussion on all four required points in the code review part. Showing a good understanding of the given codebase. Discussion is specific to the given code.
More than Half Marks
A discussion on all four required points but has minor flaws OR missing one required point.
Less than Half Marks
A discussion on all four required points but has major flaws OR Has solid discussion on only one or two required points OR the discussion is not specific to the given codebase.
No discussion on the required points or unreasonable/i mproper discussion on all points or criticise the programmer instead of program.
Discussion — OO principles
Full Marks
A solid discussion on your application of OO design principles in your extensions — specific to your code
0.5 pts Half Marks
A discussion on your application of OO design principles — specific to your code — with flaws or omission
No discussion on design principles or not specific to your code
Discussion — Design Pattern(s)
Full Marks
A solid discussion on your application of three design patterns in your extension — specific to your code
Half Marks
Discussion on your application of design patterns in your extension — specific to your code — with major flaws or omission
No discussion or not specific to your code
Submit Assignment
https://canvas.sydney.edu.au/courses/44948/assignments/388705
2022/10/22 23:28 Assignment 3 – Report
Assignment 3 Report
Criteria Ratings Pts
Discussion — Extension and Reflection
Full Marks
A solid discussion on 1) actual changes/extensions you have made in your code and the reason; AND 2) any outstanding issues or improvements or your impact on the extensibility of the code
0.5 pts Half Marks
Discussion on your actual changes/extensions and the reason AND any outstanding issues or improvements or your impact on the extensibility of the code — with major flaws or omission
No discussion on these two points
UML Diagram — Design Pattern and Element
Full Marks
Have drawn all required elements correctly AND Have correctly displayed three design pattern(s) used in your code extension and identified the participants in each design pattern correctly.
More than Half Marks
Have drawn all required elements correctly AND Have correctly displayed two design pattern(s) used in your code extension and identified the participants in each design pattern correctly.
1.5 pts Half Marks
Have only drawn some of the required elements correctly AND Have correctly displayed at least two design pattern(s) used in your code extension and identified the participants in each design pattern correctly.
Less than Half Marks
Have drawn the UML elements with major flaws OR Have correctly displayed only one design pattern(s) used in your code extension and identified the participants in the design pattern correctly.
Haven’t drawn the UML diagram OR the UML that drawn does not match your code extension
Total Points: 0
Choose a submission type.
Submit Assignment
https://canvas.sydney.edu.au/courses/44948/assignments/388705
2022/10/22 23:28 Assignment 3 – Report
Choose a file to upload
File permitted: PDF
I agree to the tool’s End-User License Agreement (https://api.turnitin.com/api/lti/1p0/user/static_eula) This assignment submission is my own, original work
Canvas Files
https://canvas.sydney.edu.au/courses/44948/assignments/388705
Submit Assignment
程序代写 CS代考 加微信: powcoder QQ: 1823890830 Email: powcoder@163.com