jpsp91 6 years ago
parent
commit
cf6fb19323
5 changed files with 55 additions and 33 deletions
  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 View File

16
     private Square window;
16
     private Square window;
17
     private Triangle roof;
17
     private Triangle roof;
18
     private Circle sun;
18
     private Circle sun;
19
+    private Circle sun2;
19
 
20
 
20
     /**
21
     /**
21
      * Constructor for objects of class Picture
22
      * Constructor for objects of class Picture
48
         roof.makeVisible();
49
         roof.makeVisible();
49
 
50
 
50
         sun = new Circle();
51
         sun = new Circle();
51
-        sun.changeColor("yellow");
52
+        sun.changeColor("blue");
52
         sun.moveHorizontal(180);
53
         sun.moveHorizontal(180);
53
         sun.moveVertical(-10);
54
         sun.moveVertical(-10);
54
         sun.changeSize(60);
55
         sun.changeSize(60);
55
         sun.makeVisible();
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
      * Change this picture to black/white display
80
      * Change this picture to black/white display
60
      */
81
      */

+ 21
- 21
Picture/package.bluej View File

2
 dependency1.from=Circle
2
 dependency1.from=Circle
3
 dependency1.to=Canvas
3
 dependency1.to=Canvas
4
 dependency1.type=UsesDependency
4
 dependency1.type=UsesDependency
5
-dependency2.from=Picture
6
-dependency2.to=Square
5
+dependency2.from=Triangle
6
+dependency2.to=Canvas
7
 dependency2.type=UsesDependency
7
 dependency2.type=UsesDependency
8
-dependency3.from=Picture
9
-dependency3.to=Triangle
8
+dependency3.from=Square
9
+dependency3.to=Canvas
10
 dependency3.type=UsesDependency
10
 dependency3.type=UsesDependency
11
 dependency4.from=Picture
11
 dependency4.from=Picture
12
-dependency4.to=Circle
12
+dependency4.to=Square
13
 dependency4.type=UsesDependency
13
 dependency4.type=UsesDependency
14
-dependency5.from=Triangle
15
-dependency5.to=Canvas
14
+dependency5.from=Picture
15
+dependency5.to=Triangle
16
 dependency5.type=UsesDependency
16
 dependency5.type=UsesDependency
17
-dependency6.from=Square
18
-dependency6.to=Canvas
17
+dependency6.from=Picture
18
+dependency6.to=Circle
19
 dependency6.type=UsesDependency
19
 dependency6.type=UsesDependency
20
-editor.fx.0.height=722
20
+editor.fx.0.height=717
21
 editor.fx.0.width=800
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
 package.divider.horizontal=0.6
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
 package.numDependencies=6
34
 package.numDependencies=6
35
 package.numTargets=5
35
 package.numTargets=5
36
 package.showExtends=true
36
 package.showExtends=true

+ 1
- 0
README.md View File

19
 Object of lab is to follow the chapter reading the doc folder. (and Draw a House!)
19
 Object of lab is to follow the chapter reading the doc folder. (and Draw a House!)
20
 
20
 
21
 Can you draw a house with a tree along side? (think `trunk` and `circle` or a tall, skunny `triangle`.
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 View File

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

+ 9
- 9
Shapes/package.bluej View File

12
 editor.fx.0.width=0
12
 editor.fx.0.width=0
13
 editor.fx.0.x=0
13
 editor.fx.0.x=0
14
 editor.fx.0.y=0
14
 editor.fx.0.y=0
15
-objectbench.height=160
16
-objectbench.width=769
15
+objectbench.height=136
16
+objectbench.width=938
17
 package.divider.horizontal=0.5996908809891809
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
 package.numDependencies=3
25
 package.numDependencies=3
26
 package.numTargets=4
26
 package.numTargets=4
27
 package.showExtends=true
27
 package.showExtends=true