Sub Menu contents

Unit 3

Creating Graphics & Images Bit by Bit

3.1 Unit Overview

3.2 Paint Pot Tutorial

3.3 Representing Images

3.4 Paint Pot Projects

3.5 Paint Pot Refactoring

3.6 Error Detection

3.7 Parity Error Checking

3.8 Magic 8 Ball

3.9 Persisting Photos

3.10 Map Tour

3.11BB Electronic Documents

3.12 Wrap Up

 

Paint Pot Projects

Be creative! In this lesson you will complete several small programming projects that add enhancements to the Paint Pot app. Hints and suggestions are provided.

Unit Objectives



Creative Mini Projects: Enhancing Paint Pot

  1. Add a button to support a 4th color option for the app.
  2. Add a custom image to the app instead of using the cat image that is provided. You can upload images to your project from either the Designer View or Blocks Editor view. Use the image as the Canvas background image. Make sure the image doesn’t have any copyright restrictions.
  3. Instead of using an existing image, take a photo with the camera and use that as the Canvas background image! (Hint: For this you’ll need to use a new Button, the Camera component, and the Camera’s AfterPicture event.) See the Paint Pic tutorial for assistance.
  4. The app currently has a ButtonPlus and ButtonMinus. But, we only completed the code for ButtonPlus. Now that you understand how to increment variables by 1, implement an algorithm for ButtonMinus that will subtract 1 from dotsize.
  5. Optional: Currently, if a user wants to use a larger dot and then use a smaller dot (or vice versa), they have to continually press the ButtonMinus (or ButtonPlus). If the current value of dotsize is 25, getting to to a size of 4 would be pain. For easier use, add a button that resets the size of the dot (circle) back to its original value. (HINT: You’ll need a second variable here to remember the original value of the dotsize.)
  6. If/Else Exercise: In computer programming, a bug is an error or defect, that prevents the app from working the way it is supposed to. In this app, if the user continues to press ButtonMinus, the value of dotsize will eventually become negative. If dotsize is negative, what will be drawn when the user touches the screen? Try fixing this bug by adding an if/then algorithm to the ButtonMinus block. (Hint: The If/Then block is found under Control in the Toolbox. If you’ve done the I Have A Dream Part 2 lesson, you’ve already seen how to use an if/else block.)
  7. Create one or more of your own enhancements for your app. Remember to write your ideas down in pseudocode before you begin programming. To get started, open App Inventor with the Paint Pot Projects template (coming soon) or your completed Paint Pot app in a separate tab. Then try to complete the programming projects outlined above.
Make sure that you do the self-check at this link and that you update your Google Site Portfolio