Create Java program that uses leaves to draw a diagonal cross in Clara's world. An example of
Fantastic news! We've Found the answer you've been seeking!
Question:
Your solution must be generic and should work for various examples. In solving this problem you may assume the following facts about Clara's world:
- The world is always surrounded by trees from all four sides
- The world's width is always equal to the world's height
- Clara starts off facing east at the corner of 1st Street and 1st Avenue (as shown in Figure 1).
- Clara's resulting position and orientation is not important.
PERMITTED COMMANDS move(); turnLeft(); turnRight(); treeLeft(); treeRight(); treeFront(); onLeaf(); putLeaf(); removeLeaf(); JAVA if, else, for, while, &&, ||, ! */
Related Book For
Organizational Behaviour Concepts Controversies Applications
ISBN: 978-0132310314
6th Canadian Edition
Authors: Nancy Langton, Stephen P. Robbins, Timothy A. Judge, Katherine Breward
Posted Date: