Unit 6 Lesson 13, Puzzle 13 Challenge Exemplar

csd-unit-6-lesson-13
#1

Is there an exemplar as to how to keep the car from not going off the app lab screen for the accelerometer lesson?

#2

There’s no exemplar for that, but you should be able to do it by using getters and setters to check the car element’s x and y properties, then setting them back to the edge of the screen if they go off the edge.

For example, if the car’s x property is less than zero, set it back to zero.

Elizabeth

#3

Okay. That is what I did, but an exemplar would be nice. Also, are there examples of physical prototypes for the project with Unit 6?