Laporan Alice - 2 - 7 - Practice
Laporan Alice - 2 - 7 - Practice
Vocabulary:
Identify the vocabulary word for each definition below.
Addition (+), subtraction (-), multiplication (*), and division (/).
Answer questions about an object, such as its height, width, depth, and even its distance
to another object.
a. Use a math operator in the getDistanceTo function so that the baby bunny stops before colliding with the hedge.
a. Use the getDepth function to avoid a collision when the bunny moves towards the hedge. Adjust with additional math
calculations if necessary.
Copyright © 2022, Oracle and/or its affiliates. Oracle, Java, and MySQL are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.
Optional Activities:
Complete the following optional practice activities below to continue practicing the concepts you learned in this lesson.
1. Create a new project using the desert template. Add a lioness object and three boulder objects to the scene.
a. Use functions to program the lioness to move precisely next to each boulder object; landing next to the boulders but
not going through them.
2. Create a new project using the grassy template. Add three trees and one bird to the scene. Position the bird in one of the
trees. Ensure that the trees are at least 10 meters apart from each other.
a. Use functions to program the bird to fly from one tree to the next, landing in the tree but not going through it. Hint:
Declare a procedure for the fly motion. Then, have the bird flap its wings while simultaneously moving the distance to
the tree.
b. Set the bird as the vehicle for the camera, so the camera follows the bird around as it flies around the scene. c.
Copyright © 2022, Oracle and/or its affiliates. Oracle, Java, and MySQL are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.