Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | Last revisionBoth sides next revision | ||
p5js-week-07 [2022/06/11 08:11] – renick | p5js-week-07 [2022/06/11 08:15] – renick | ||
---|---|---|---|
Line 56: | Line 56: | ||
Let's review the really big ideas first! | Let's review the really big ideas first! | ||
- | - encapsulation | + | - **encapsulation** |
- | - generalization | + | - **generalization** |
- | When we make a function which contains a procedure, we are using encapsulation. | + | When we make a function which contains a procedure, we are using **encapsulation**. |
< | < | ||
Line 71: | Line 71: | ||
</ | </ | ||
- | We studied procedures and encapsulation here: | + | When we add arguments to our function so that the function can be used in more cases, we are using **generalization**. |
- | + | ||
- | When we add arguments to our function so that the function can be used in more cases, we are using generalization. | + | |
< | < | ||
Line 85: | Line 83: | ||
</ | </ | ||
- | We learned about generalization here: | + | We are also using **generalization** when we structure our data into a class and use a constructor with arguments. |
- | + | ||
- | We are also using generalization when we structure our data into a class and use a constructor with arguments. | + | |
< | < | ||
Line 361: | Line 357: | ||
<iframe src=" | <iframe src=" | ||
</ | </ | ||
- | |||
===== Now for something new: a shape function ===== | ===== Now for something new: a shape function ===== | ||
+ | |||
+ | Let's get back to making random shapes, which we might used to make weird slices of toast. | ||
Now we have a Point class. Using that abstraction, | Now we have a Point class. Using that abstraction, |