jpsp91 hace 6 años
padre
commit
cf6fb19323
Se han modificado 5 ficheros con 55 adiciones y 33 borrados
  1. 22
    1
      Picture/Picture.java
  2. 21
    21
      Picture/package.bluej
  3. 1
    0
      README.md
  4. 2
    2
      Shapes/Triangle.java
  5. 9
    9
      Shapes/package.bluej

+ 22
- 1
Picture/Picture.java Ver fichero

@@ -16,6 +16,7 @@ public class Picture
16 16
     private Square window;
17 17
     private Triangle roof;
18 18
     private Circle sun;
19
+    private Circle sun2;
19 20
 
20 21
     /**
21 22
      * Constructor for objects of class Picture
@@ -48,13 +49,33 @@ public class Picture
48 49
         roof.makeVisible();
49 50
 
50 51
         sun = new Circle();
51
-        sun.changeColor("yellow");
52
+        sun.changeColor("blue");
52 53
         sun.moveHorizontal(180);
53 54
         sun.moveVertical(-10);
54 55
         sun.changeSize(60);
55 56
         sun.makeVisible();
57
+        
58
+        
59
+        sun2 = new Circle();
60
+        sun2.changeColor("yellow");
61
+        sun2.moveHorizontal(100);
62
+        sun2.moveVertical(-10);
63
+        sun2.changeSize(60);
64
+        sun2.makeVisible();
65
+        sun2.slowMoveVertical(300);
66
+        
67
+        sun.slowMoveVertical(300);
56 68
     }
57 69
 
70
+    
71
+    /**
72
+    public void draw2()
73
+    {
74
+     sun.slowMoveVertical(300);   
75
+    }
76
+    **/
77
+    
78
+    
58 79
     /**
59 80
      * Change this picture to black/white display
60 81
      */

+ 21
- 21
Picture/package.bluej Ver fichero

@@ -2,35 +2,35 @@
2 2
 dependency1.from=Circle
3 3
 dependency1.to=Canvas
4 4
 dependency1.type=UsesDependency
5
-dependency2.from=Picture
6
-dependency2.to=Square
5
+dependency2.from=Triangle
6
+dependency2.to=Canvas
7 7
 dependency2.type=UsesDependency
8
-dependency3.from=Picture
9
-dependency3.to=Triangle
8
+dependency3.from=Square
9
+dependency3.to=Canvas
10 10
 dependency3.type=UsesDependency
11 11
 dependency4.from=Picture
12
-dependency4.to=Circle
12
+dependency4.to=Square
13 13
 dependency4.type=UsesDependency
14
-dependency5.from=Triangle
15
-dependency5.to=Canvas
14
+dependency5.from=Picture
15
+dependency5.to=Triangle
16 16
 dependency5.type=UsesDependency
17
-dependency6.from=Square
18
-dependency6.to=Canvas
17
+dependency6.from=Picture
18
+dependency6.to=Circle
19 19
 dependency6.type=UsesDependency
20
-editor.fx.0.height=722
20
+editor.fx.0.height=717
21 21
 editor.fx.0.width=800
22
-editor.fx.0.x=2086
23
-editor.fx.0.y=284
24
-objectbench.height=101
25
-objectbench.width=461
22
+editor.fx.0.x=459
23
+editor.fx.0.y=26
24
+objectbench.height=125
25
+objectbench.width=870
26 26
 package.divider.horizontal=0.6
27
-package.divider.vertical=0.8007380073800738
28
-package.editor.height=427
29
-package.editor.width=674
30
-package.editor.x=2011
31
-package.editor.y=179
32
-package.frame.height=600
33
-package.frame.width=800
27
+package.divider.vertical=0.7987804878048781
28
+package.editor.height=517
29
+package.editor.width=768
30
+package.editor.x=50
31
+package.editor.y=29
32
+package.frame.height=714
33
+package.frame.width=894
34 34
 package.numDependencies=6
35 35
 package.numTargets=5
36 36
 package.showExtends=true

+ 1
- 0
README.md Ver fichero

@@ -19,3 +19,4 @@ Be sure to
19 19
 Object of lab is to follow the chapter reading the doc folder. (and Draw a House!)
20 20
 
21 21
 Can you draw a house with a tree along side? (think `trunk` and `circle` or a tall, skunny `triangle`.
22
+# FirstLab-Shapes

+ 2
- 2
Shapes/Triangle.java Ver fichero

@@ -21,8 +21,8 @@ public class Triangle
21 21
      */
22 22
     public Triangle()
23 23
     {
24
-        height = 30;
25
-        width = 40;
24
+        height = 60;
25
+        width = 80;
26 26
         xPosition = 50;
27 27
         yPosition = 15;
28 28
         color = "green";

+ 9
- 9
Shapes/package.bluej Ver fichero

@@ -12,16 +12,16 @@ editor.fx.0.height=0
12 12
 editor.fx.0.width=0
13 13
 editor.fx.0.x=0
14 14
 editor.fx.0.y=0
15
-objectbench.height=160
16
-objectbench.width=769
15
+objectbench.height=136
16
+objectbench.width=938
17 17
 package.divider.horizontal=0.5996908809891809
18
-package.divider.vertical=0.7822685788787483
19
-package.editor.height=593
20
-package.editor.width=1188
21
-package.editor.x=246
22
-package.editor.y=192
23
-package.frame.height=825
24
-package.frame.width=1314
18
+package.divider.vertical=0.7826747720364742
19
+package.editor.height=508
20
+package.editor.width=836
21
+package.editor.x=0
22
+package.editor.y=23
23
+package.frame.height=716
24
+package.frame.width=962
25 25
 package.numDependencies=3
26 26
 package.numTargets=4
27 27
 package.showExtends=true