Portfolio Reflection Questions
Make a copy of this document in your Portfolio Assignments folder and answer these questions in the spaces below. Once complete, turn in this assignment according to the steps given by your teacher.
3.4 Paint Pot Projects Curriculum Page
Answer the following questions:
1. For enhancement #6 (the if/else exercise) give a brief description of your solution to this problem. Provide a screen shot of your code -- the revised blocks -- and describe how the if/else block works to solve the problem in this case. If appropriate, include a description of any significant problems or bugs you encountered in solving this problem. App Inventor now has a Download Blocks as Image feature (right click on the white space in the blocks editor to choose) that also can be used to take a screenshot of all of your code or the Windows snipping tool can be used.
Answer
To solve this problem, I used a if then block to make it so the dotsize could only be reduced if the current dotsize it greater than one. This means that the dotsize can never go below a value of 1. If globaldotsize > 1, set globaldotsize to globaldotsize - 1.
2. When you use the Camera component to take a picture as the Canvas background, explain why the picture goes away when the app is restarted. HINT: Think about the different hardware components we talked about in an earlier lesson and where on the device the picture is stored. What do you think could be done to prevent the picture from disappearing when the app is restarted?
Answer
The image resets when the app is restarted because the image is not permanently stored on the devices hard drive, but in the RAM. Because RAM only temporarily stores data from apps, restarting the application clears the data stored in RAM, in this case the image taken. To prevent this, there needs to be a way to store the image not in RAM, but on the hard drive. This will save the image into the devices memory.
Link for Paint Pot app writeup in my APCS-P folder: https://docs.google.com/document/d/1EbmHxbsodGNH_vf_fuO21Gv2Fc2vViH1Mcz2wCDKrHY/edit?usp=sharing