![]() |
Lab 3
|
Exercise 1: An Invocation TreeDraw an invocation tree (an abbreviated version of a Java Execution Model) for the execution of theSPW.makePattern(p) , where SPW
symbolizes the SimplePictureWorld object that receives the method invocation
and p denotes the blue triangle Picture object (shown below). ![]()
Each node contains the value of the receiver, followed by the method name, followed by the actual parameters enclosed in parentheses. The result of invoking the method is then shown after a colon. Note that nodes at the same level are drawn from top to bottom in the order that the methods are invoked.
EXERCISE 2: Escher Knitting PatternsPlease download the folder Escher used two basic patterns to produce an amazing variety of patterns:
LabKnitWorld.java
file.
Your Task
|