For enhancement #6 above (the if/else exercise) give a brief descriptions of your solution to this problem. Provide a screenshot 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.
I used an if-statement to solve the problem of the dot size reducing to zero or a negative number. As shown by the code blocks below, the statements to reduce the dot size will only be executed when the current dot size is greater than one. The minimum we want the dot size to be is 1 (zero would not leave any marks), and so it will only reduce if the dot size is greater than 1.
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?
The picture is removed from the app when it is restarted probably because it is stored in RAM, or temporary storage. This kind of storage is not permanent, and so the picture would be removed after the app is stopped. To prevent the picture from disappearing, it would have to be stored in the more permanent storage on the “phone storage” memory. This would keep the picture until the file is manually deleted.