Skip to content

Commit 64d4ebf

Browse files
authored
Merge pull request #217 from multimentha/missing_exercises
Add exercise 14-12 (star class) to the repo
2 parents 6defb7b + d4baa0a commit 64d4ebf

1 file changed

Lines changed: 28 additions & 0 deletions

File tree

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
// Learning Processing
2+
// Daniel Shiffman
3+
// http://www.learningprocessing.com
4+
5+
// Exercise 14-12: Rewrite Example 14-19 so that the
6+
// PShape object itself is inside your own Star class
7+
// that also includes x,y variables for position.
8+
// Make multiple instances of the object an array.
9+
// Here is some code to get you started.
10+
11+
class Star {
12+
// The PShape object
13+
PShape s;
14+
// The location where I will draw the shape
15+
float x,y;
16+
17+
Star() {
18+
// What goes here?
19+
}
20+
21+
void move() {
22+
// What goes here?
23+
}
24+
25+
void display() {
26+
// What goes here?
27+
}
28+
}

0 commit comments

Comments
 (0)