APS - UFO Tutorial Option

Event Listener Adds Details to Create an Interactive User

Now you will learn of the Event Listener, an active part of many programs, especially gaming programs.  Yes, you are going to make a game and learn how to make the arrow keys work to move a spaceship.

In the prior program you used a single key input to create interest with the user telling the Baby Dragon to fly.  Here you will learn to use the details of the keyboard arrows, to move an object around the scene to pick up Aliens.  

As noted in previous assignments, the purpose is a question on the Directions for Programming and is therefore an important question for your AP Exam Task that you will do in this course.  It is there because College Board will ask you about yours.  You must have ideas of what you want to build and do as well as practice on answering the questions.  Always include the root stem of the question in your answer, example, "The purpose of . . . is" , or ". . .  is the purpose ", etc.  Learning to technically write answers is important.  Technical writing is to the point, no fluff.  No opening sentence that must be a summary and no closing sentence to summarize that might twist your point around.  Provide information that is detailed, but correct, and move on.  

As we continue practicing to learn coding, we will also continue practicing creating detailed answers to questions as well as learning to explain our code that we will write as an extension of the tutorial code.  All items that are on the Directions for Programming are targeted towards the AP Exam.  It is important that you do your best with these questions to learn now from feedback.  This is not allowed with your final project.

Assignment Requirement Directions:

A.  Create the program as detailed in the tutorial provided below in the PowerPoint. This format will allow you to work in portions.  Don't forget to comment at the beginning where this code came from (document has a first page providing University providing the work).  Citation example:

//  All code in this program is created from XYZ Tutorial from  _________

// as provided by GaVS except as noted.

// Notations of code I created will be commented prior to the code starting

// and after at each instance. Code noted as such will have been created solely by

// me without assistance from others.

      APS - UFO Game Tutorial - Final.pptx Links to an external site. 

B.  Test as you go along to make sure small parts of the code is working.  If you wait until the end, there may be issues causing other issues, making debugging a long process. 

Testing as you go is part of the development process for creating code.  As you test a future section of code you must go back and continue to test existing sections as you may have added code causing unintended consequences to prior working code.  This is the point that you debug, not just for the new code, but to also fix anything that was not anticipated with the new section of code.  

****

With your testing you will find that the arrow keys have a bug.  Please debug the program after the initial completion and add a question answer to the Directions for Programming Assignments below as number 15.  Explain what was happening with the keys when you used them and what you needed to do to correct the situation to make the keys work as you would expect.  Detail what each arrow key does now for documentation after your change to the program.  Use a chart to show before and after for quality documentation.  Don't forget to detail what was happening before you started fixing the keys as well as what happens after you fixed the keys.  

Being able to document a bug fix is crucial to College Board.  This is practice for detailing and keeping track of items that don't work in your own programs as you create them.  Before and after reflection, quality analysis of the issue, and being able to write about the situation at the detail level is an important part of working on a team in the computer science world.  

****

C  Add an extension or modification to the code that is created by you, documenting that this is code created by you.  A short note here (very) for the purpose of the code is required.  Citation example:

//  Code below is created by me without assistance to . . . 

 Here you pick something succinct and to the point.  This is not where you write excessive detail.  Detailing the full purpose and function (how it works) is to be done in the question answers.  Here you provide keywords to provide the intent of the code.

         // End of code nameYouGaveTheSectionOfCodeForComments  created by me.

Note that the long connected words above are written in camelCase.  Note that your eyes catch the capitals and can read the words just as normal without the spaces.  Please write variables and procedureNames using camelCase.  This is not a code requirement, but an accepted norm for coding. Spaces are not valid in variable and other names in code.

D.  The extension / modification must have an intended purpose that will extend your learning past that of this tutorial or use information that you learned in a new and unique way.  Yes, you may add to the scene other characters, objects, etc.   No, you may not do something you did in the past.  Look around, try another procedure or function you have not used prior to adding to the program in a new, unique way.  Add decisions to combine with new items here and stretch a little more.   This will involve multiple statements not just one.  

Example of unacceptable addition to a program:  Suppose you add another avatar and it moves right through another figure in the scene.  Unless you are creating a spooky scene, this may not be appropriate.  Time to analyze visually what happened, reflect, and modify some code, either in the new code you entered or from prior to now get your intended outcome.

E.  Follow the directions in the APS - Resources rubric (UFO) for your work.  The number of the question should always be used, followed by the answer to the question using the stem words in the question.