Help Dashboard
Groups Calendar Inbox History Studio Support
2023_S2C_SOFT2201_ND Assignments
Immersive Reader
2023 Semester 2
Announcements
Ed Discussion
Recorded Lectures
Assignments
Reading List
Unit outline (COMP9201)
Unit outline (SOFT2201)
Assignment 2 – Report
Due: Sun Sep 24, 2023 23:59
Unlimited A!empts Allowed
In Progress
NEXT UP: Submit Assignment
6 Possible Points Add Comment
Available: Sep 5, 2023 0:00 un!l Oct 4, 2023 23:59
Problem Overview
You are required to design an applica!on model for a Space Invaders game. Space Invaders is a classic arcade game played on a rectangular screen with different types of aliens on it. The player controls a spaceship at the bo#om of the screen and can shoot projec!les at the aliens. The aliens move horizontally and descend towards the player’s spaceship. If the aliens reach the bo#om of the screen, shoot the player, or collide with the player’s spaceship, the game is lost. The player can move their spaceship horizontally to avoid the aliens’ projec!les and shoot them down. The game is won when all the aliens are destroyed. The score is calculated based on the number of aliens destroyed. The dura!on of the game is clocked un!l all the aliens are destroyed.
Q: What is Space Invaders?
A: Some real-world examples could be found here and here .
Assignment 2 Requirement
In assignment 2, you are going to implement your space invaders game and refactor your UML class diagram according to your code. You will need to ensure that your applica!on is configurable with a JSON text file. You must use the GoF design pa!erns in your implementa!on as requested below:
Projec!les must be created using the Factory method.
The state/colour change of each bunker must be controlled using the State pa#ern. The enemies and bunkers must be created using the Builder pa#ern.
The behaviour of enemy projec!les will be controlled using the Strategy pa#ern.
Please find the detailed tasks below:
Implementa!on Task
You will use the Java Programming Language to implement the UML class diagram you designed in assignment 1. In this assignment, you are now responsible for the implementa!on of the en!re applica!on code.
What we provide to you
JSON file: an example JSON file format is provided to you here that you can start with for your implemen!ng. A sample configura!on reader is also provided here for your considera!on. gradle file: a sample build.gradle file is provided to you here .
A codebase is provided to you here to help get you started. You are free to modify this as much or as li#le as you like.
What we expect from you
Your space invaders game is now expected to support the following features in your code:
The game can be created in different sizes, with different sized bunkers at different posi!ons, which must be configurable, defined in and read from the sample JSON configura!on file. The colour, ini!al posi!on (as an x-y coordinate), speed and lives of the player spaceship must be configurable, specified in and read from the sample JSON configura!on file. Furthermore, the Enemy posi!ons and projec!le strategies are defined within the JSON configura!on file.
The Bunkers
If a bunker is hit by a projec!le (either from the player or an enemy), the bunker receives damage (i.e. the colour changes) and the projec!le is destroyed. If a bunker is hit 3 !mes, it should be removed from the game.
The bunker will change colour according to the number of hits it has received, this represents its current state. Green = 0 hits, Yellow = 1 hit, Red = 2 hits.
The Player Spaceship
You must be able to control the spaceship with the arrow keys to move the spaceship le% and right across the screen.
Pressing the spacebar should shoot a projec!le (Slow Straight Projec!le) from the players posi!on, moving in an upwards direc!on. This projec!le will either hit an Alien or Bunker, or disappear at the top of the screen. The projec!le can be shot at any!me (even while moving), however, only 1 player projec!le can be on screen at a given !me.
If a player projec!le collides with an enemy projec!le, both projec!les are destroyed.
If the player spaceship receives a hit from an enemy projec!le, 1 life will be deducted. If there are no lives le%, the game ends.
The Enemies
All enemies must be able to move back and forth horizontally across the screen in an organised group, while descending down when they reach the edges of the screen.
Enemies must be removed from the game when they are hit by a player projec!le. When this occurs, the speed of all enemies is slightly increased.
If any enemy reaches the bo#om of the screen or reaches the player, the game ends.
If an enemy touches a bunker, the bunker is immediately removed from the game (i.e. the bunkers should not affect enemy movement).
Enemies shoot projec!les at the player at random intervals. There can be no more than 3 enemy projec!les on screen at a !me.
Each enemy will shoot a projec!le with a par!cular behaviour. The two behaviours are “Fast Straight Projec!les” and “Slow Straight Projec!les”. The fast straight projec!les should travel twice as fast as the slow straight projec!les. This should be implemented using the strategy pa#ern,
A#en!on Please: You are only allowed to implement the above features in your current assignment, and you should not include any other features. Mark deduc!on will be applied otherwise. Report Task
You are allowed a maximum of 1000 words report in this assignment which must clearly and concisely cover the followings:
1. A discussion on how your design (i.e., class diagram) for assignment 1 helped or hindered your design made in this assignment Ra!onalise changes you have made to your assignment 1 design
2. A discussion on each design pa#ern you have used including
Where you used it (be explicit as to what classes are involved and in what roles)
What this pa#ern does for your code in terms of SOLID/GRASP principles
What overall benefits this pa#ern provides (be specific to your code, not the pa#ern in general) What drawbacks this pa#ern causes (be specific to your code, not the pa#ern in general)
3. The UML class diagram describing your whole system, including design pa#erns.
4. Any acknowledgement/reference required.
Submission Details
You are required to submit all assessment items by the due date to different portals.
You have to submit your report on Canvas AND You have to submit your code on Edstem
Report. Submit your UML class diagram and your report as a SINGLE pdf document on this portal. If your UML diagram is too large, then you need to
1) include the whole UML diagram;
2) include enlarged versions of the key components when you refer to them.
Code. Submi#ed to Edstem by using this link . Your code should be submi#ed as only your src folder, build.gradle, and readme.
A#en!on Please: the sample json configura!on file must be put into the resources folder of main under the src folder. Mark deduc!on will be applied if the loca!on is wrong.
The readme file has to cover any point you would like your marker to know. In your readme, you must have the following items how to run your code (e.g., any quirks to run your applica!on)
which files and classes are involved in each design pa#ern implemented
anything else that you would like your marker to know
We will execute your code by running ‘gradle clean build run’ in the terminal with the environment configura!on below: Gradle 7.4.2
Unix-based System
If your code fails to run using the instruc!ons provided above, all coding parts of your submission will receive a ZERO mark.
Academic integrity
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 integrity breaches and will treat all allega!ons seriously.
Further informa!on on academic integrity, and the resources available to all students can be found on the academic integrity pages on the current students website: h#ps://sydney.edu.au/students/academic-integrity.html.
We use Turni!n, which includes AI detec!on, to detect poten!al instances of plagiarism or other forms of academic integrity breach. If such matches indicate evidence of plagiarism or other forms of academic integrity breaches, your teacher is required to report your work for further inves!ga!on.
You may only use ar!ficial intelligence and wri!ng assistance tools in assessment tasks if you are permi#ed to by your unit coordinator, and if you do use them, you must also acknowledge this in your work, either in a footnote or an acknowledgement sec!on.
Further informa!on 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: h#ps://sydney.edu.au/students/research-integrity-ethics.html.
Compliance statement
In submi$ng this work, I acknowledge I have understood the following:
I have read and understood the University of Sydney’s Academic Integrity Policy 2022.
The work is substan!ally 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 quota!on marks.
I have acknowledged any assistance provided in preparing the work including the use of copy-edi!ng, proof-reading, and automated wri!ng and drawing tools (including ar!ficial intelligence (AI), reference generators, transla!on so%ware, grammar checkers, but not spell checkers).
The work has not previously been submi#ed 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 submi#ed to similarity detec!on so%ware (Turni!n) and a copy of the work will be retained in Turni!n’s paper repository for future similarity checking. Note: work submi#ed by postgraduate research students for research purposes is not added to Turni!n’s paper repository.
Engaging in plagiarism or academic dishonesty in coursework will, if detected, lead to the University commencing proceedings under the Academic Integrity Policy 2022. and the Academic Integrity Procedures 2022.
Engaging in plagiarism or academic dishonesty in research-focussed work will lead to the University commencing proceedings under the Research Code of Conduct 2013 and the Academic Integrity Procedures 2022.
Engaging another person to complete part or all of the submi#ed work will, if detected, lead to the University commencing proceedings against me for poten!al student misconduct under the University of Sydney (Student Discipline) Rule 2016.
View Rubric
Discussion on Design Changes
view longer descrip!on
UML Diagram — Design Pa#ern
view longer descrip!on
UML Diagram — Correctness
view longer descrip!on
Iden!fying Design Pa#erns
view longer descrip!on
Discussion on Design Pa#erns
view longer descrip!on
Choose a submission type.
Upload Studio
Full Marks
Covered the design changes you have made from the assignment 1 design (i.e., class diagram).
Full Marks
Have correctly displayed the design pa#ern(s) used in the code implementa!on
Full Marks
Have drawn all required elements correctly
Full Marks
Clearly iden!fy where the design pa#erns are used in the code implementa!on — specific to your code
Assignment 2 Report
Criteria Ra”ngs Pts
0.5 pts Half Marks
Weak discussion on the design changes you have made from your assignment 1 design
0.5 pts Half Marks
Have displayed the design pa#ern(s) used in the code implementa!on with flaws
0.5 pts Half Marks
Have drawn some of the required elements correctly
no discussion on the design changes you have made from your assignment 1 design
Have displayed the design pa#ern(s) used in the code implementa!on with major flaws or not matching the code implementa!on
Have drawn the UML elements with major flaws or haven’t drawn the UML diagram
Total Points: 0
Incorrectly iden!fying the design pa#ern(s) used in the code implementa!on or no design pa#ern(s) presented
Full Marks
Comment on benefits and drawbacks of design pa#erns you used according to design principles and OO theory — specific to your code
Half Marks
Comment on benefits and drawbacks on using these design pa#erns according to design principles and OO theory — specific to your code — with major flaws or omission
No discussion on benefits and drawbacks on using these design pa#erns according to design principles and OO theory or not specific to your code
I agree to the tool’s End-User License Agreement This assignment submission is my own, original work
Canvas Files
Drag a file here, or
Choose a file to upload
File permi#ed: PDF
Submit Assignment
Code Help, Add WeChat: cstutorcs