Skip to content
This repository has been archived by the owner on Jul 25, 2021. It is now read-only.

Commit

Permalink
Update intro to oo presentation
Browse files Browse the repository at this point in the history
  • Loading branch information
autarch committed Feb 2, 2012
1 parent 8101c81 commit d2d24a4
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions htdocs/presentations/intro-to-oo/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -560,7 +560,7 @@ <h1>Inheritance, Roles, Polymorphism</h1>
<ul>
<li>What makes this different from imperative programming?</li>
<li><code>write_file( $path, $content )</code></li>
<li>Inheritance, Roles, and Polymorphism is one of the big differences</li>
<li>Inheritance, Roles, and Polymorphism are some of the big differences</li>
</ul>
</div>

Expand Down Expand Up @@ -678,13 +678,13 @@ <h1>Polymorphism</h1>
<h1>Polymorphism Versus If/Then</h1>

<pre><code>if ( $file->{type} eq 'mp3' ) {
# save file with title tag
# write file with title tag
} else {
# save file
# write file
}

# Polymorphism lets us write ...
$file-&gt;save();</code></pre>
$file-&gt;write();</code></pre>
</div>


Expand Down Expand Up @@ -883,7 +883,7 @@ <h1>Composition</h1>

<ul>
<li>Objects can contain other objects</li>
<li>A <code>File</code> object may return it's last modified time as a <code>DateTime</code></li>
<li>A <code>File</code> object may return its last modified time as a <code>DateTime</code></li>
<li>This is called <strong>composition</strong></li>
</ul>
</div>
Expand Down

0 comments on commit d2d24a4

Please sign in to comment.