You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Chapter12/README.md
+3Lines changed: 3 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -138,3 +138,6 @@ Define a class `Pseudo_window` that looks as much like a `Window` as you can mak
138
138
139
139
## [Exercise 13](exercises/13)
140
140
Define a `Binary_tree` class derived from `Shape`. Give the number of levels as a parameter (`levels==0` means no nodes, `levels==1` means one top node with two sub-nodes each with two sub-nodes, etc.). Let a node be represented by a small circle. Connect the nodes by lines (as is conventional). P.S. In computer science, trees conventionally grow downward from a top node (amusingly, but logically, often called the root).
141
+
142
+
## [Exercise 14](exercises/14)
143
+
Modify `Binary_tree` to draw its nodes using a virtual function. Then, derive a new class from `Binary_tree` that overrides that virtual function to use a different representation for a node (e.g., a triangle).
0 commit comments