example.turtlelogo.House   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
dl 0
loc 24
c 0
b 0
f 0
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A main(String[]) 0 23 1
1
package example.turtlelogo;
2
3
import org.gannacademy.cdf.turtlelogo.AnimatedTurtle;
4
import org.gannacademy.cdf.turtlelogo.Turtle;
5
6
import java.awt.*;
7
8
public class House {
9
  public static void main(String[] args) {
10
    Turtle rafael = new AnimatedTurtle();
11
    int size = 100;
12
    rafael.pu();
13
    rafael.bk(size / 2.0);
14
    rafael.pd();
15
    rafael.pw(4);
16
    rafael.pc(Color.red);
17
    rafael.fd(size);
18
    rafael.lt(135);
19
    rafael.fd(Math.sqrt(2) * size);
20
    rafael.lt(135);
21
    rafael.fd(size);
22
    rafael.lt(135);
23
    rafael.fd(Math.sqrt(2) * size);
24
    rafael.lt(90);
25
    rafael.fd(Math.sqrt(2) * size / 2.0);
26
    rafael.lt(90);
27
    rafael.fd(Math.sqrt(2) * size / 2.0);
28
    rafael.lt(135);
29
    rafael.fd(size);
30
    rafael.rt(90);
31
    rafael.fd(size);
32
  }
33
}