Automated MkDocs build

This commit is contained in:
gitea-actions[bot]
2026-03-24 23:18:14 +00:00
parent a3276d75a3
commit a186cfbbf2
2 changed files with 5 additions and 5 deletions

View File

@@ -1168,14 +1168,14 @@ An animal object <em>is part of</em> a compound object (semantically) but the an
<span class="w"> </span><span class="p">}</span>
<span class="p">}</span>
</code></pre></div>
<p><img alt="Image" src="../assets/1.png" /></p>
<p><img alt="Image" src="/lectures/dms/assets/1.png" /></p>
<p><em>Composition</em> - The object only exists if the parent object exists, if the parent object is deleted then so is the child object.
The zoo object owns the compound object. If the zoo object is deleted then the compound object is also deleted.</p>
<div class="highlight"><pre><span></span><code><span class="kd">public</span><span class="w"> </span><span class="kd">class</span> <span class="nc">Zoo</span><span class="w"> </span><span class="p">{</span>
<span class="w"> </span><span class="kd">private</span><span class="w"> </span><span class="n">Compound</span><span class="w"> </span><span class="n">dogArea</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">Compound</span><span class="p">();</span>
<span class="p">}</span>
</code></pre></div>
<p><img alt="Image" src="../assets/2.png" /></p>
<p><img alt="Image" src="/lectures/dms/assets/2.png" /></p>
<p><strong>Inheritance</strong>
A way of forming new classes based on existing classes. Has a "is-a" relationship.</p>
<p><em>Polymorphism</em> - A concept in object oriented programming. Method overloading and method overriding are two types of polymorphism.
@@ -1193,7 +1193,7 @@ A way of forming new classes based on existing classes. Has a "is-a" relationshi
<span class="p">}</span>
</code></pre></div>
<p>The super keyword called the parent class' constructor.</p>
<p><img alt="Image" src="../assets/3.png" /></p>
<p><img alt="Image" src="/lectures/dms/assets/3.png" /></p>
<p><strong>What is the difference between an abstract class and an interface</strong>
- Java abstract class can have instance methods that implement a default behaviour. May contain non-final variables.
- Java interfaces have methods that are implicitly abstract and cannot have implementations. Variables are declared final by default.</p>