Reference no: EM132460736
ITEC102 Introduction to Programming Assignment - Shoot UFO, Sydney Institute of Business and Technology, Australia
Learning Goals - This assignment contributes to the learning outcomes as follows:
1. Apply problem solving skills to develop algorithms that solve small to medium-sized computational problems: Introductory experience in developing an algorithm to solve a problem from an informal specification of the problem.
2. Design and code implementations of their algorithms in an imperative programming language: Practical experience in translating a simple algorithm into an equivalent Processing program that uses drawing, animation and variables.
3. Use standard software engineering practices to document, debug and test their programs: Experience in developing a clear program from a specification, testing the conformance of the program to the specification, and debugging any problems that are detected.
Introduction - This assignment asks you to write a program to draw and animate shapes. You should only need to use material from up to and including Chapter Four of the textbook. The most relevant module is Pixels and Variables.
We strongly suggest that you divide the assignment up into parts, tackle each part separately and don't move on until you get each one working.
Questions - If you have questions about the programming for this assignment, ask on the Discussion Forum on LMS or consult with your tutor. No extensions will be granted except for serious and unavoidable disruption. Contact Muhammad Atif Qureshi as soon as possible, preferably before the due date, if you have suffered a disruption that affects your ability to submit this assignment.
What your program needs to do -
The aim of this assignment is the implementation of a program called "Shooting UFO".
1) Your program should use a window that is 500x500 in size.
2) The background of the initial screen should be set using the image "background 1" in the assignment folder. (Hint: you may have to use load Image() function in Processing). The initial screen should like the following.
3) Once the program starts, the shooting gun (similar to the shown in the figure below) should be drawn at the bottom of the screen. The shooting gun should be able to move left or right as mouse moves on the screen but not upwards or downwards.
4) At the same time, a shape called UFO should appear from the top of the screen (at random position on x-axis) and should start moving down the screen (see the figure below.).
5) Once the UFO is off the screen from bottom, it should appear again from top of the screen, randomly at x-axis.
6) Anytime during the execution, if the use clicks the mouse a red colored thick "beam / line" should appear from the edge of the shooting gun towards top of the screen (See figure below).
7) While shooting the beam, if UFO is in the range of the beam. The UFO should disappear from the screen and should start from the top of the screen again.
8) If the beam hits the UFO, it should be counted as "Hit", otherwise the program should consider it as "Miss" and count it separately.
9) Anytime during the execution, if the use presses "s" key, the program should stop and should show the result screen.
10) The result screen should have the background as shown in the figure below and available in Assignment 1 folder.
11) The result screen should show total clicks, number of hits and number of miss fires.
12) While on the result screen, if the user presses "r" key, the game should start again and all the counters should be set to zero again.
Note - All required figures are in attached file.
Attachment:- Introduction to Programming Assignment File.rar