Przeglądaj źródła

my first saturday

Simran Bhutani 8 lat temu
rodzic
commit
9e32d45261

+ 15
- 1
Picture/Picture.java Wyświetl plik

@@ -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,11 +49,24 @@ 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
+        sun2= new Circle();
59
+        sun2.changeColor("yellow");
60
+        sun2.moveHorizontal(140);
61
+        sun2.moveVertical(10);
62
+        sun2.changeSize(50);
63
+        sun2.makeVisible();
64
+        
65
+        
66
+        sun2.slowMoveVertical(70);
67
+        
68
+        
69
+        
56 70
     }
57 71
 
58 72
     /**

+ 13
- 13
Picture/package.bluej Wyświetl plik

@@ -2,33 +2,33 @@
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 20
 editor.fx.0.height=722
21 21
 editor.fx.0.width=800
22
-editor.fx.0.x=2086
23
-editor.fx.0.y=284
22
+editor.fx.0.x=558
23
+editor.fx.0.y=47
24 24
 objectbench.height=101
25 25
 objectbench.width=461
26 26
 package.divider.horizontal=0.6
27 27
 package.divider.vertical=0.8007380073800738
28 28
 package.editor.height=427
29 29
 package.editor.width=674
30
-package.editor.x=2011
31
-package.editor.y=179
30
+package.editor.x=232
31
+package.editor.y=118
32 32
 package.frame.height=600
33 33
 package.frame.width=800
34 34
 package.numDependencies=6

+ 6
- 6
Shapes/package.bluej Wyświetl plik

@@ -12,15 +12,15 @@ 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
15
+objectbench.height=157
16 16
 objectbench.width=769
17 17
 package.divider.horizontal=0.5996908809891809
18
-package.divider.vertical=0.7822685788787483
19
-package.editor.height=593
18
+package.divider.vertical=0.7824933687002652
19
+package.editor.height=583
20 20
 package.editor.width=1188
21
-package.editor.x=246
22
-package.editor.y=192
23
-package.frame.height=825
21
+package.editor.x=126
22
+package.editor.y=23
23
+package.frame.height=812
24 24
 package.frame.width=1314
25 25
 package.numDependencies=3
26 26
 package.numTargets=4

BIN
doc/BlueJ-objects-first-ch1.pdf Wyświetl plik