Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions ch05construction/08objects.ipynb.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,11 +87,11 @@ def move(self, delta_t):
# sending requests to the web is not fully supported on jupyterlite yet, and the
# cells below might error out on the browser (jupyterlite) version of this notebook
import requests
from IPython.display import Image
from IPython.display import SVG

def yuml(model):
result = requests.get("http://yuml.me/diagram/boring/class/" + model)
return Image(result.content)
return SVG(result.content)


# %%
Expand Down Expand Up @@ -410,7 +410,7 @@ def __init__(self, age, name):
# UML shows inheritance with an open triangular arrow pointing from subclass to superclass.

# %%
yuml("[Animal]^-[Bird],[Bird]^-[Eagle],[Bird]^-[Starling]%")
yuml("[Animal]^-[Bird],[Bird]^-[Eagle],[Bird]^-[Starling]")

# %% [markdown]
# ## Aggregation vs Inheritance
Expand All @@ -430,7 +430,7 @@ def __init__(self, age, name):
# The Boids situation can be represented thus:

# %%
yuml("[Model]<>-*>[Boid],[Boid]position++->[Vector],[Boid]velocity++->[Vector]%")
yuml("[Model]<>-*>[Boid],[Boid]position++->[Vector],[Boid]velocity++->[Vector]")


# %% [markdown]
Expand Down
Loading