Q8: Visualize this!

Table of Contents


Objectives

  • Create your own images using programming statements.
  • Draw shapes on images using colors.
  • Work with arrays, lists and loops.
  • Continue to explore pair programming.

Academic Honesty

Read the Scholastic Honesty Policy and Assignment Integrity policies of the syllabus. Here are some clarifications for this particular assignment:

  • You are encouraged to work with one other student of this class following the rules of Pair Programming for Homework Assignments. If you choose to pair program, there is a bonus applied.
  • You may copy small portions of the code from the textbook or the instructor's web pages.
  • You may get help from people other than your pair-programming partner if you get stuck, but only if they do not show or tell you the code to type. Instead they should show you other examples that you can adapt to your code.
  • Do NOT copy or modify code from, nor provide code to, any other student or unauthorized source.
  • Do NOT give a copy of your code to your designated pair-programming partner if you did not develop the code together.

If you get stuck, take a break and come back to it later, talk to the professor, or ask a classmate for help. Remember, do not allow the classmate to type code for you or show you code to copy. Instead the classmate should show you techniques using other examples that you can adapt.

Project Crafting Specifications

Complete the following specifications for your programming project.

  1. Start with the piano visualizer we developed in class. However, use your creativity to draw different imagery whenever a key is pressed.

    In other words, do not just draw fixed-sized ovals at random locations in columns above a key that fade away over time.

  2. The name of the class that controls the drawing of the imagery must be Visualizer (the same name we used in class) and the visualizer screen must appear above the piano keys.

    Please use the specified name as it makes for easier grading.

  3. Your project must have at least six or more arrays (including the 4 arrays containing the keys and notes in the Piano class).

    Arrays can store any type of data like colors, shape coordinates, shape sizes or shape types. Make a note in the README.txt file for which class(es) you added the array.

  4. Call the getObjects() method of the World and store the list in a List variable. Then use a for-each loop to process each item in the list.

    For example, have every item turn, move or change color in response to an event such as a mouse click or key press. Make sure your README.TXT explains how to activate the process.

  5. Update the README.TXT file (Scenario Information) for your project to fill in all the Greenfoot supplied information like your name, project title and version or date, as well as providing the current status. Even though the project file did not include the usual labels, like those shown below, please add them.
    PROJECT TITLE: Piano Visualizer
    PURPOSE OF PROJECT: Show shapes while playing the piano.
    VERSION or DATE: MM/DD/20YY
    HOW TO START THIS PROJECT: Press run after compiling,
    AUTHORS: Your Name (and Pair Programming Partner) extending a scenario from Michael Kolling.
    USER INSTRUCTIONS: Use the keyboard or mouse to play the piano.
    
    Added array to the (the class name) class.
    Left-click the visualizer with the mouse to turn all the shapes towards the mouse click.
    
  6. Submit a zip file (with all source code) of your original project to Canvas as explained in the section of this document: How to Submit.

Visualization Ideas

Here are a few ideas to get you started.

  • Draw different shapes such as rectangles, triangles, circles or something more complex (see lesson 8.3.2)
  • Draw shapes in different locations than above the keys (see lesson 8.3.4)
  • Draw shapes using random colors (see lesson 8.3.5)
  • Have the shapes fade over time by changing the transparency value in the act() method (see lesson 8.3.6)
  • Have the shapes move on the visualizer screen (see lesson 2.2.5)
  • Draw several shapes using a loop in the visualize() method (see lesson 7.3.3)
  • Change the background color of the visualizer screen (see lesson 8.2.4)

Crafting Extra Credit

Adding the following are worth extra credit points:

  1. Complete the programming project using pair programming. (2 points)
  2. Add multiple Actor subclasses that help create the imagery or add animation when the piano keys are pressed. (2 points)
  3. In one or more shape classes, use one of the mouse methods of the Greenfoot class to add the ability of the user to interact with the shape. (1 point)
  4. Code at least one more for or while loop, other than the two loops already in the Piano class and the for-each loop specified. State in your README.TXT file which class you added the extra loops. (2 points)
  5. Publish your scenario on the Greenfoot Gallery and include the URL in your README.TXT file. (1 point)

Make certain that your README.TXT file describes any extra credit attempted.

Grading Criteria

The instructor will evaluate your assignment using the following criteria. Each criteria represents a specific achievement of your assignment and has a scoring guide. The scoring guide explains the possible scores you can receive.

Some scoring guides have a list of indicators. These indicators are a sign of meeting, or a symptom of not meeting, the specific criterion. Note that a single indicator may not always be reliable or appropriate in a given context. However, as a group, they show the condition of meeting the criterion.

For information on grading policies, including interpretation of scores, see the syllabus page.

Project Compilation

  • 4: Source code compiles with no errors or warnings
  • 2: Source code compiles with warnings
  • 0: Does not compile, not turned in, or wrong folder name

Project Functionality

  • 10: Demonstrates mastery of the assignment
    • Has extra features or demonstrates techniques beyond the assignment
    • Applies concepts from the lesson(s) appropriately
    • Meets all specifications (see above) with particularly elegant solutions
    • No errors encountered during operation
  • 8: Has all the functionality expected of the assignment
    • Demonstrates many techniques from the lesson
    • Meets all specifications (see above)
    • Implementation seems more complicated than necessary.
    • May have one minor error
  • 6: Has most of the functionality expected of the assignment
    • Demonstrates some techniques from the lesson
    • Meets all but one of the specifications (see above)
    • Implementation seems excessively complicated.
    • May have 2-3 minor errors or has not pair programmed
  • 4: Has some of the functionality expected of the assignment
    • Demonstrates some techniques from the lesson
    • Meets at least 1/2 of the specifications (see above)
    • Implementation seems excessively complicated.
    • May have more than 3 minor errors
  • 2: Serious functional problems but shows some effort and understanding
    • Meets less than 1/2 of the of the specifications (see above)
    • Has a major error or many minor errors
    • Implementation seems very convoluted
    • Demonstrates few techniques from the lesson
  • 0: Does not execute, no specifications met, or wrong folder name
  • -2: penalty for not use pair programming

README.TXT File for Project

  • 2: README.TXT file submitted with specified information included
  • 1: README.TXT submitted but some information was not included
  • 0: No README.TXT submitted or wrong folder name

Maximum Score: 16, plus extra credit

How to Submit

Submit means that you are presenting your work for consideration and grading. Follow these instructions carefully and exactly to turn in your quest (assignment) and maximize your XP:

  1. Create a folder named "project" (no extra characters) and place your programming project files in this folder, including your "project.greenfoot file".
  2. Zip the folder and submit the zip file to the Q7 quest slot of Canvas.

Please do not add any extra characters to the above folder names. Also, do not put any spaces or special characters like #, : or $ in zip file or folder names. Your crafted code must work as submitted. Remember to test and double check your files before and after submitting them. If you make a mistake, you can resubmit up to the deadline but must resubmit all your quest files.

Home | Canvas | Schedule | Syllabus | Room Policies
Help | FAQ's | HowTo's | Links
Last Updated: January 11 2017 @00:28:12