// Java Name - // Bug Tracing Worksheet #1 Period - // Use the Bug & Location classes from the current unit of study to trace // the following code and answer the included questions. import java.awt.Color; public class BugTracing1 { public static void main(String[] args) { // ************** FLIK ********************* Bug flik = new Bug(); System.out.println(flik.getLocation()); // 1. What is flik's location (row, col)? System.out.println(flik.getDirection()); // 2. What is flik's direction? System.out.println(flik.getColor()); // 3. What are the red, green, & blue components of flik's color? flik.turn(); flik.turn(); flik.turn(); flik.turn(); flik.move(); flik.move(); flik.move(); flik.turn(); System.out.println(flik.getLocation()); // 4. What is flik's location (row, col)? System.out.println(flik.getDirection()); // 5. What is flik's direction? flik = new Bug(Color.BLUE, 270, 1, 3); System.out.println(flik.getLocation()); // 6. What is flik's location (row, col)? System.out.println(flik.getDirection()); // 7. What is flik's direction? System.out.println(flik.getColor()); // 8. What are the red, green, & blue components of flik's color? flik.move(); flik.move(); flik.turn(); flik.turn(); System.out.println(flik.getLocation()); // 9. What is flik's location (row, col)? System.out.println(flik.getDirection()); // 10. What is flik's direction? System.out.println(flik.getColor()); // 11. What are the red, green, & blue components of flik's color? flik = new Bug(); flik.setColor(Color.BLACK); flik.setDirection(900); Location tempLocation = new Location(3, 1); flik.setLocation(tempLocation); flik.move(); flik.turn(); flik.turn(); flik.move(); System.out.println(flik.getLocation()); // 12. What is flik's location (row, col)? System.out.println(flik.getDirection()); // 13. What is flik's direction? System.out.println(flik.getColor()); // 14. What are the red, green, & blue components of flik's color? } }