While the robot is in the process of moving, it is considered to occupy both its original
and new grid square. No other robot can move into either of those grid squares.
• If any robot moves into the fortress square, the game ends, and the player receives their
• The player can shoot robots by clicking on any single grid square. If a robot is occupying
that square (whether it is stationary or moving to/from it), that robot disappears from
the screen and is removed from the game.
The player cannot actually fire more than once per second. However, the player may queue
up firing commands by clicking on several squares in quick succession. Queued-up firing
commands will then be executed at one-second intervals, until there are no commands
• Each time a robot is created or destroyed, or the player fires and misses, this should be
logged in an on-screen text area. (Don’t include other events in this log.)
The word “randomly” appears several times above. If you prefer, you can instead implement
some sort of pre-determined pattern or logic, as long as the full range of values is still in play.
The player receives an increasing score as follows:
• The score begins at 0.
• For each second that passes (until the game ends), the score increases by 10 points.
• For each robot that the player successfully shoots, the score increases by 10+100 t
d is the robot’s delay value (in milliseconds), as above, and t is the player’s time delay.
That is, t is the time (in milliseconds) elapsed between the player issuing the fire command (clicking on a square) and the fire command actually being executed.
(The 100 t
part is a bonus, since it’s naturally more difficult to hit a robot with a queuedup fire command, and more difficult still if the robot moves faster.)
The current score should be shown on the screen at all times.
3 Pre-Existing Code
There are pre-existing demo apps written in Java using Swing and JavaFX. It is recommended
that you choose one of them as the starting point for your application, although this is not
strictly required. JavaFX is slightly more modern than Swing, but the two demo apps are functionally identical.
Each demo app sets up a basic GUI layout, but also includes an …Arena class that displays a
grid on the screen, with hard-coded dimensions. It is not finished. The intention is for you to
modify this class according to your needs, but the basic logic regarding where things are drawn
on the screen is given to you.
Both demo apps use the Gradle build tool, which isn’t being assessed in this assignment, but is
still very useful for making things work (especially for JavaFX). To compile and run the code
Page 2 of 5
SEC Assignment 1 Semester 2, 2020
from the command line, simply type:
[[email protected]]$ ./gradlew run (On Linux/MacOS)
C:\…> gradlew run (On Windows)
Keep the directory structure intact. That is, all the source code should go inside the directory
src/main/java (although you may optionally create subdirectories within that to represent
Java packages, if you wish). If you change the name of App.java, you must change the reference
to it in the build.gradle file too.
The image file(s) for the robots (and a couple for the “fortress”) are in src/main/resources.
There are some included images, but you may substitute your own. You could replace robots
with zombies, pirates, etc. if you prefer. You can stick with a single image for all the “baddies”,
or select a random image each time.
If you prefer to use an IDE, you can. However, any difficulties that you run into as a result of
your IDE are your problem!
4 Threading Requirements
Technically speaking, this application could be made to work without multiple threads.
However, it is a requirement of this assessment that you do use multiple threads, and do so in
a sensible fashion, to prevent race conditions and deadlocks, and to preserve maintainability.
You are also required to make use of the following, for their intended purposes:
• A blocking queue.
• A thread pool.
These are likely not the only threading constructs you will need to use, but the rest is up to you
To help implement the timing requirements, it is recommended that you make use of:
• System.currentTimeMillis(), which returns a long integer: the number of milliseconds
elapsed since 1970. (Call this twice, and take the difference of results, to determine how
many milliseconds have elapsed between the two calls.)
• Thread.sleep(), which suspends the current thread for a specified number of milliseconds.
Alternatively, there are more advanced timing mechanisms available too if you prefer to investigate and use those.
Prepare a report (3 pages or more) that addresses the following issues:
• Explain your design in regards to threading. In particular:
– Which classes are responsible for starting threads, and what are these threads used
Page 3 of 5
SEC Assignment 1 Semester 2, 2020
– How do they communicate?
– How do they share resources (if they do at all) without incurring race conditions
– How do your threads end?
Your discussion must reflect your own specific design. There are no marks here for simply describing how threads and threading mechanisms work in general.
• What would be the best way (architecturally speaking) to transform this app into a cooperative multi-player game, where each player has their own separate fortress, and they
must work together to stop the robots.
Consider some plausible non-functional requirements for such a system, and say what
architectural decisions could help satisfy them.
6 Mark Allocation
This assignment will be marked out of 30.
You will receive marks for your code as follows:
(a) [4 marks] – Appropriate division of responsibilities among threads/tasks. You haven’t
missed obvious opportunities for multithreading. You don’t have too many threads doing
unnecessarily trivial tasks. All your threads and tasks contribute towards solving the
(b) [4 marks] – Appropriate use of a blocking queue and other thread communication mechanisms as needed. The blocking queue in particular must be an actual part of the solution
(not just something added on).
(c) [3 marks] – Appropriate use of a thread pool and other thread-creation logic (with same
proviso as above).
(d) [3 marks] – Appropriate use of threading mechanisms in general to prevent race conditions and deadlocks.
(e) [3 marks] – Your code follows best practice in terms of readability and maintainability.
In the event that your code does not compile or run (or does not correctly implement the requirements in sections 1–4), it will be broadly assumed that it does not meet the above marking
criteria. However, the marker may exercise discretion.
In regards to your report:
(f) [3 marks] – Your actual design is thoroughly explained.
(g) [5 marks] – You convincingly identify a range of relevant issues that would need to be
solved, in order for a multi-player version of the system to be created.
(h) [5 marks] – Your convincingly explain what architectural decisions could be made to
solve the issues identified. Focus on the relevance of these decisions to the problem at
hand. Do not simply describe general types of software architecture.
Page 4 of 5
SEC Assignment 1 Semester 2, 2020
Submit your assignment electronically, via Blackboard, before the deadline. To submit, do the
(a) Fill out and sign a declaration of originality. A photo, scan or electronically-filled out
form is fine. Whatever you do, ensure the form is complete and readable! Place it (as a
.pdf, .jpg or .png) inside your project directory.
(b) Zip up your entire project directory as-is (as a .zip or .tar.gz file). Leave nothing out.
(c) Submit your zip/tar.gz file to the assignment area on Blackboard.
(d) Re-download, open, and run your submitted work to ensure it has been submitted correctly.
You are responsible for ensuring that your submission is correct and not corrupted. You may
make multiple submissions, but only your newest submission will be marked. The late submission policy (see the Unit Outline) will be strictly enforced.
• DO NOT use WinRar (or the .rar format in general).
• DO NOT have nested zip/tar.gz files. One is enough!
• DO NOT try to email your submission as an attachment. Curtin’s email filters are configured to silently discard emails with potentially executable attachments.
In an emergency, if you cannot upload your work to Blackboard, please instead upload it to
Google Drive, or a private Github repository, or another online service that preserves immutable
timestamps and is not publicly accessible.
8 Academic Integrity
Please see the Coding and Academic Integrity Guidelines (available alongside this specification on
In summary, this is an assessable task. If you use someone else’s work or assistance to help
complete part of the assignment, where it’s intended that you complete it yourself, you will
have compromised the assessment. You will not receive marks for any parts of your submission
that are not your own original work. Further, if you do not reference any external sources that you
use, you are committing plagiarism and/or collusion, and penalties for academic misconduct
Curtin also provides general advice on academic integrity at
The unit coordinator may require you to provide an oral justification of, or to answer questions
about, any piece of written work submitted in this unit. Your response(s) may be referred to
as evidence in an academic misconduct inquiry.
It has regularly been expressed that 1943 was a watershed in the advancing universe of melodic theater. Talk about this assertion and analyze the collection and class of pre-1943 with post-1943 melodic theater. It has been asserted by numerous that 1943 was a watershed in the advancing universe of melodic theater. There is a predominance of proof to recommend that this is genuine that will be examined inside this exposition. One of the primary ways this change can be seen is through the changing manners by which ladies were spoken to and their part inside the melodic entertainment business world. Actually, woman's rights and the changing perspectives on ladies' part in theater was both a compelling element of this defining moment and a result of the advancement made. It very well may be contended that 1943 was a defining moment for melodic theater as a result of the portrayal of ladies as instructed, working citizenry, the open doors given to ladies of shading, and the stage it given to ladies in the business, for example, chiefs and choreographers (Van Aken, 2006, p.18). Prior to 1943, the melodic entertainment business world was overflowing with severe mentalities towards ladies which can be seen in famous shows of the time, for example, in Follies, Sally (1920), and The Gingham Girl (1922), (Barnes, 2015, P.14). Probably the greatest wellspring of chance ladies had in the mid twentieth century tagged along as Ziegfeld's Follies. In any case, the rules to be utilized as an entertainer in the Follies was very exacting, in a statement from Ziegfeld he records the particular ways the young ladies should glance to be recruited, completing his assertion with 'The eyes ought to be huge and expressive. A standard profile is a chosen resource… The legs must be shapely… the extents of the figure must be great.' (Kantor and Andrews, 2004, n/a). This statement shows the unreachably exclusive requirements men had for ladies during the 20s and the externalization of them in the functions of melody young ladies. This is significant in light of the fact that it shows that ladies weren't profoundly regarded before the 1940s. It could in all likelihood be contended that the arrangement of Ziegfeld's recruiting cycle and the glorification of those picked to perform 'set up for current sexual typification' (Norman, 2018, para.1). This can be additionally exemplified in depictions of the Follies exhibitions. The ladies are portrayed as 'extremely obscene', (Mates, 1987, p.129), demonstrating the degree of the consideration on their bodies. Truth be told, Ziegfeld's shows simply demonstrated to get more provocative every year, 'He went from the intriguing to the express over the long haul anyway never entirely going too far to full bareness.' (Legacy.com, 2018, para.7). This adds extra proof to show the differentiation of how ladies were spoken to before 1943. Then again, it very well may be contended that Follies gave ladies an ability to be self aware certainty that they clutched for the remainder of their carries on with, (Norman, 2018, para.3). That is reasonable for those ladies, however what sort of message did this ship off the young ladies not picked to be in the shows? It gave the basic ramifications that without having a 'awesome' body, they were not deserving of the consideration given in any case. This assists with indicating the differentiation between the manner in which ladies were treated in the mid twentieth century contrasted with after the 40s support up the possibility that 1943 was a defining moment. This thought proceeded for a long time is still around today in specific territories of execution, for example, Moulin Rouge entertainers. Today, the females are needed to be a base stature of 5'9 and have 'A thin effortless figure' (Moulin Rouge (Site Officiel), 2019, n/a). This bears similitudes to Follies, which is justifiable as it is hard to totally destroy this sort of externalization. Nonetheless, it is less well known now, as melodic auditorium is less centered around introducing sexuality. Another of Ziegfeld's shows was Sally (1920), a melodic about a dishwasher who turns into a Follies star. This storyline was normal be that as it may, as this sort of 'poverty to newfound wealth story, otherwise called 'Cinderella musicals', turned out to be famous during the 20s. The normal plotline of these accounts would comprise of a youthful, generally poor, working young lady, who picks up the fondness of an attractive mogul. Despite the fact that much of the time she additionally increases a fruitful profession (The New York Public Library, 2018, para.19). This made the suggestion that ladies at the time required a more fruitful man to improve their lives and to get any sort of vocation. Hence, this shows that men were viewed as the more prevailing sex. An extra issue introduced by these storylines turning out to be so famous is featured in this statement, 'these early and mid-20th century Broadway musicals depicted courageous women conflicted between ladylike home life and expert independence' (Cantu, 2015, p.3). It recommends that there is an expense for not adjusting to the social builds of ladylike conduct at that point. Maybe, this was the start of musicals offering solid social and political expressions through addressing whether ladies ought to have more autonomy. In any case, one motivation behind why 'Cinderella musicals' were so refreshing at the time may have been that female crowds had the option to see the beginnings of the idea of ladies accomplishing effective professions and working during the 20s. During the second modern insurgency more positions opened up for ladies (Burnette, 2011, p.56). The expanded perceivability of ladies in the working environment was being reflected in these musicals. For example, Mary Thompson in The Gingham Girl (1922) 'who follows her beau to Manhattan, just to out-succeed him in business' (The New York Public Library, 2018, para.20). The subsequent universal war, 1939-1945, achieved a great deal of progress just as giving 'exceptional openings for work for ladies' (Colman, P. 1995, n/a). To intricate, because of men disappearing to war, ladies needed to turn out to be more dynamic in the workforce and the possibility of lady turned out to be all the more much of the time inseparable from working individuals, bringing the idea of the working lady. Since melodic theater consistently strived to reflect reality, it appeared well and good that this change offered an entirely different side to ladies which was utilized in melodic performance center as new intriguing parts to speak to the everchanging functions in the public eye. This can be found in the Rodgers and Hammerstein show Oklahoma (1943), when as opposed to seeing a gathering of theme young ladies opening the show, which was more normal in the revue where 'upwards of 280 chorale young ladies may be utilized;' (Mates, 1987, p.148), the window ornaments rose to uncover the straightforward scene of a lady stirring margarine, something that right now would be viewed as a typical assignment. As theater has consistently strived to speak to reality, as recently referenced, this shows how ladies were getting less observed as generalized amusement and more as persevering individuals. This thought of the working lady was furthermore exemplified by genuine ladies working in the entertainment biz industry. By and by utilizing Oklahoma for instance, we can take a gander at crafted by Agnes de Mille who was said to have upset the manner in which move was used in melodic theater. This was finished with her fantasy artful dance scene in which move was incorporated into the storyline of the melodic unexpectedly. It was said in the book 'America's Musical Stage' by Julian Mates, 'Agnes de Mille's fantasy grouping moves pushed the story ahead, to such an extent that no melodic with genuine assumptions could manage without a fantasy artful dance for quite a long time to come.' (Mates, 1987, p.190). This shows the quality of the effect de Milles work had on later shows and the manner in which move was utilized in melodic theater. Others saw the extent of accomplishment accomplished by this new style of movement and how it helped the movement of the storyline of the melodic itself, and through this understood that it was something that could and should be repeated through different works of melodic theater. This is apparent in crafted by different choreographers. Nonetheless, de Mille's work set the development of melodic venue move moving in that move began being utilized in a diegetic way instead of inside a fantasy. 'Jerome Robbins utilizes diegetic move numbers', (Symonds and Taylor, 2013, p.86). This implies that the characters realize they are moving, considering a more unadulterated incorporation of move into the melodic, it additionally gives the characters occasion to remark and notice (Symonds and Taylor, 2013, p.88). These acclaimed move numbers from musicals, for example, West Side Story (1957) and Gypsy (1959), were moved inside the conditions of the presentation. It very well may be contended that this shows how crafted by Agnes de Mille changed how move was utilized in the melodic entertainment business world after 1943. Another focal point to be examined, concerning the impact the war had on ladies' part in the melodic entertainment business world, would be that it opened up numerous open doors for ladies of shading at the time which was significant in this time paving the way to the social liberties period. It was said in Post-WWII African-American Musicals by Laurence Maslon: 'the quantity of dark entertainers in plays and musicals on Broadway in 1946 was in excess of multiple times the number before World War II started.' To summarize another statement from this source, the expanded open doors was an impression of the social changes during and after the second universal war (Maslon, 2018, para.3). This could be on the grounds that so many individuals of color, including ladies, joined the military in world war 2 and aided in the war exertion. It was said that they 'put forth significant commitments to the war attempt, and acquired high acclaims and honors for their battles and forfeits', (Historyplace.com, 2018, n/a), successfully changing numerous individuals' perspectives, and changing the essence of melodic auditorium during the 40s. This can be found in the numerous shows that came out at the time comprising of an all dark cast or an incorporated cast, for example, the shows Carmen Jones (1943) which was 'a specta>GET ANSWER