Commit 1fc35f20 authored by Thibaut Lunet's avatar Thibaut Lunet
Browse files

TL: added first question with svg image

parent 53ed206f
<?xml version="1.0" encoding="UTF-8" standalone="no"?><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" contentStyleType="text/css" height="194px" preserveAspectRatio="none" style="width:472px;height:194px;background:#FFFFFF;" version="1.1" viewBox="0 0 472 194" width="472px" zoomAndPan="magnify"><defs/><g><!--MD5=[7fd4401f5c5cb0e3d029c879cad30c04]
class Animal--><g id="elem_Animal"><rect codeLine="5" fill="#F1F1F1" height="80.8125" id="Animal" rx="2.5" ry="2.5" style="stroke:#181818;stroke-width:0.5;" width="199" x="7" y="61"/><ellipse cx="80.25" cy="77" fill="#ADD1B2" rx="11" ry="11" style="stroke:#181818;stroke-width:1.0;"/><path d="M80.2969,83.2031 C81.7969,83.2031 83.0313,82.6406 83.9375,81.5781 L82.5625,80.0625 C82.0156,80.6563 81.3594,81.0469 80.5625,81.0469 C78.8906,81.0469 77.7344,79.7188 77.7344,77.4375 C77.7344,75.2188 78.8906,73.875 80.4531,73.875 C81.2656,73.875 81.8594,74.1875 82.3906,74.6719 L83.7656,73.125 C83.0156,72.3906 81.8594,71.7188 80.4531,71.7188 C77.5,71.7188 75.1719,73.8594 75.1719,77.5313 C75.1719,81.25 77.5469,83.2031 80.2969,83.2031 Z " fill="#000000"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="44" x="100.75" y="81.7852">Animal</text><line style="stroke:#181818;stroke-width:0.5;" x1="8" x2="205" y1="93" y2="93"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="94" x="13" y="109.9883">#name : string</text><line style="stroke:#181818;stroke-width:1.0;" x1="8" x2="205" y1="117.4063" y2="117.4063"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="187" x="13" y="134.3945">+void move(double distance)</text></g><!--MD5=[8cfd53d7b93de71616faf984e351dd35]
class Squirrel--><g id="elem_Squirrel"><rect codeLine="10" fill="#F1F1F1" height="80.8125" id="Squirrel" rx="2.5" ry="2.5" style="stroke:#181818;stroke-width:0.5;" width="163" x="284" y="7"/><ellipse cx="336.75" cy="23" fill="#ADD1B2" rx="11" ry="11" style="stroke:#181818;stroke-width:1.0;"/><path d="M336.7969,29.2031 C338.2969,29.2031 339.5313,28.6406 340.4375,27.5781 L339.0625,26.0625 C338.5156,26.6563 337.8594,27.0469 337.0625,27.0469 C335.3906,27.0469 334.2344,25.7188 334.2344,23.4375 C334.2344,21.2188 335.3906,19.875 336.9531,19.875 C337.7656,19.875 338.3594,20.1875 338.8906,20.6719 L340.2656,19.125 C339.5156,18.3906 338.3594,17.7188 336.9531,17.7188 C334,17.7188 331.6719,19.8594 331.6719,23.5313 C331.6719,27.25 334.0469,29.2031 336.7969,29.2031 Z " fill="#000000"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="49" x="357.25" y="27.7852">Squirrel</text><line style="stroke:#181818;stroke-width:0.5;" x1="285" x2="446" y1="39" y2="39"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="61" x="290" y="55.9883">-nuts : int</text><line style="stroke:#181818;stroke-width:1.0;" x1="285" x2="446" y1="63.4063" y2="63.4063"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="151" x="290" y="80.3945">+void collect(int nNuts)</text></g><!--MD5=[0ba60c1c7eece7977c024cb94d0d3fa3]
class Fish--><g id="elem_Fish"><rect codeLine="15" fill="#F1F1F1" height="64.4063" id="Fish" rx="2.5" ry="2.5" style="stroke:#181818;stroke-width:0.5;" width="199" x="266" y="123.5"/><ellipse cx="348.25" cy="139.5" fill="#ADD1B2" rx="11" ry="11" style="stroke:#181818;stroke-width:1.0;"/><path d="M348.2969,145.7031 C349.7969,145.7031 351.0313,145.1406 351.9375,144.0781 L350.5625,142.5625 C350.0156,143.1563 349.3594,143.5469 348.5625,143.5469 C346.8906,143.5469 345.7344,142.2188 345.7344,139.9375 C345.7344,137.7188 346.8906,136.375 348.4531,136.375 C349.2656,136.375 349.8594,136.6875 350.3906,137.1719 L351.7656,135.625 C351.0156,134.8906 349.8594,134.2188 348.4531,134.2188 C345.5,134.2188 343.1719,136.3594 343.1719,140.0313 C343.1719,143.75 345.5469,145.7031 348.2969,145.7031 Z " fill="#000000"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="26" x="368.75" y="144.2852">Fish</text><line style="stroke:#181818;stroke-width:0.5;" x1="267" x2="464" y1="155.5" y2="155.5"/><line style="stroke:#181818;stroke-width:1.0;" x1="267" x2="464" y1="163.5" y2="163.5"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="187" x="272" y="180.4883">+void move(double distance)</text></g><!--MD5=[2139127cd573b0b5e2657d322d0f6880]
reverse link Animal to Squirrel--><g id="link_Animal_Squirrel"><path codeLine="20" d="M226.0515,76.5742 C245.6044,72.4975 265.4615,68.3574 283.8258,64.5286 " fill="none" id="Animal-backto-Squirrel" style="stroke:#181818;stroke-width:1.0;"/><polygon fill="none" points="227.2734,83.4699,206.2657,80.6994,224.4159,69.7646,227.2734,83.4699" style="stroke:#181818;stroke-width:1.0;"/></g><!--MD5=[148c53dede49fe4472cc2dd7d4afcf03]
reverse link Animal to Fish--><g id="link_Animal_Fish"><path codeLine="21" d="M226.1914,126.455 C239.4381,129.2168 252.8224,132.0074 265.7857,134.7101 " fill="none" id="Animal-backto-Fish" style="stroke:#181818;stroke-width:1.0;"/><polygon fill="none" points="224.4159,133.2354,206.2657,122.3006,227.2734,119.5301,224.4159,133.2354" style="stroke:#181818;stroke-width:1.0;"/></g><!--MD5=[d7d0c1a17a5f2079a91b7b9ca338be56]
@startuml test
skinparam classAttributeIconSize 0
left to right direction
class Animal {
#name : string
- -
+void move(double distance)
}
class Squirrel {
-nuts : int
- -
+void collect(int nNuts)
}
class Fish {
- -
+void move(double distance)
}
Animal <|- - Squirrel
Animal <|- - Fish
@enduml
PlantUML version 1.2022.7(Mon Aug 22 19:01:30 CEST 2022)
(GPL source distribution)
Java Runtime: OpenJDK Runtime Environment
JVM: OpenJDK 64-Bit Server VM
Default Encoding: UTF-8
Language: de
Country: DE
--></g></svg>
\ No newline at end of file
**Looking at the UML diagram below, which one of those assertions is _false_ ?**
<p float="left">
<img src="static/v04-l2-05-uml.svg" alt="UML Graph" width="512">
</p>
- {0} : The `Fish` class redefines the `move` method
- {1} : Both `Fish` and `Squirrel` have access to the name attribute
- {2} : The `Squirrel` class is a specialization of the `Animal` class
- {3} : The `Fish` class overloads the `move` method
<!--- solution : 3 -->
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment