Skip to content

Commit 7c84638

Browse files
committed
Add dependency diagram
1 parent 14e5492 commit 7c84638

4 files changed

Lines changed: 192 additions & 9 deletions

File tree

lectures/dependencies.dot

Lines changed: 169 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,169 @@
1+
// Lecture dependency diagram
2+
// Solid edges = strict prerequisite (must read X before Y)
3+
// Dashed edges = helpful background (X provides useful context for Y)
4+
5+
digraph dependencies {
6+
rankdir=TB
7+
node [shape=box, style="rounded,filled", fontname="Helvetica", fontsize=11,
8+
fillcolor="#f0f4ff", color="#4466aa", penwidth=1.5]
9+
edge [color="#444444"]
10+
bgcolor = "#eeeeee"
11+
12+
// === OOP & Software Engineering ===
13+
subgraph cluster_oop {
14+
label="Object-Oriented Programming\n& Software Engineering"
15+
style="rounded,dashed"
16+
color="#8888cc"
17+
fontname="Helvetica Bold"
18+
fontsize=13
19+
20+
intro [label="Introduction"]
21+
objects [label="Objects"]
22+
pitfalls [label="Java Pitfalls"]
23+
java_rep [label="Representing Values"]
24+
encapsulation [label="Encapsulation"]
25+
subtyping [label="Subtyping"]
26+
intf_design [label="Interface Design"]
27+
exceptions [label="Exceptions"]
28+
inheritance [label="Inheritance"]
29+
mod_design [label="Modular Design"]
30+
testing [label="Testing"]
31+
patterns [label="Design Patterns"]
32+
generics [label="Generics"]
33+
}
34+
35+
// === Data Structures and Algorithms ===
36+
subgraph cluster_dsa {
37+
label="Data Structures and Algorithms"
38+
style="rounded,dashed"
39+
color="#cc8844"
40+
fontname="Helvetica Bold"
41+
fontsize=13
42+
43+
recursion [label="Recursion"]
44+
lists [label="Linked Lists"]
45+
complexity [label="Complexity\nAnalysis"]
46+
loopinv [label="Loop Invariants"]
47+
trees [label="Trees"]
48+
hashtables [label="Hash Tables"]
49+
parsing [label="Parsing"]
50+
sorting [label="Sorting"]
51+
radix_sort [label="Linear-Time\nSorting"]
52+
heaps [label="Heaps"]
53+
avl [label="Balanced Search Trees"]
54+
graphs [label="Graphs"]
55+
traversals [label="Graph Traversals"]
56+
ssp [label="Shortest Paths"]
57+
undecidability [label="Undecidability"]
58+
}
59+
60+
// === Programming Models ===
61+
subgraph cluster_pm {
62+
label="Systems & Programming Models"
63+
style="rounded,dashed"
64+
color="#66aaaa"
65+
fontname="Helvetica Bold"
66+
fontsize=13
67+
68+
gui [label="GUIs"]
69+
guievents [label="Events &\nAnimation"]
70+
uidesign [label="UI Design"]
71+
concurrency [label="Concurrency"]
72+
synchronization [label="Synchronization"]
73+
jvm [label="JVM &\nBytecode"]
74+
}
75+
76+
// ============================
77+
// Strict prerequisites (solid)
78+
// ============================
79+
80+
// Core OOP chain
81+
intro -> objects
82+
objects -> pitfalls
83+
objects -> java_rep
84+
objects -> encapsulation
85+
encapsulation -> subtyping
86+
subtyping -> intf_design
87+
subtyping -> inheritance
88+
encapsulation -> exceptions
89+
exceptions -> intf_design
90+
91+
// Software engineering
92+
inheritance -> mod_design
93+
encapsulation -> testing
94+
95+
// Data structures
96+
objects -> recursion
97+
recursion -> complexity
98+
recursion -> lists
99+
subtyping -> generics
100+
lists -> trees
101+
lists -> generics
102+
generics -> trees
103+
generics -> hashtables
104+
trees -> heaps
105+
trees -> avl
106+
trees -> parsing
107+
108+
// Algorithm analysis
109+
complexity -> sorting
110+
complexity -> trees
111+
complexity -> hashtables
112+
sorting -> radix_sort
113+
114+
// Graphs
115+
trees -> graphs [style=dashed] // graphs generalize but don't strictly require trees
116+
complexity -> graphs
117+
graphs -> traversals
118+
traversals -> ssp
119+
heaps -> ssp
120+
121+
// GUI
122+
gui -> guievents
123+
124+
// Systems
125+
concurrency -> synchronization
126+
127+
// ============================
128+
// Helpful background (dashed)
129+
// ============================
130+
131+
// OOP connections
132+
java_rep -> encapsulation [style=dashed]
133+
intf_design -> mod_design [style=dashed]
134+
encapsulation -> mod_design [style=dashed]
135+
136+
// SE to data structures
137+
encapsulation -> lists [style=dashed]
138+
encapsulation -> generics [style=dashed]
139+
140+
// Algorithm analysis
141+
loopinv -> sorting [style=dashed]
142+
complexity -> heaps [style=dashed]
143+
complexity -> avl [style=dashed]
144+
145+
// Design patterns bridge
146+
inheritance -> patterns [style=dashed]
147+
subtyping -> patterns [style=dashed]
148+
generics -> patterns [style=dashed]
149+
hashtables -> patterns [style=dashed, label="interning", fontsize=9]
150+
151+
// GUI connections
152+
patterns -> gui [style=dashed]
153+
inheritance -> gui [style=dashed]
154+
patterns -> guievents [style=dashed]
155+
guievents -> uidesign [style=dashed]
156+
157+
// Concurrency
158+
gui -> concurrency
159+
objects -> concurrency [style=dashed]
160+
synchronization -> guievents [style=dashed]
161+
162+
// JVM
163+
inheritance -> jvm [style=dashed]
164+
parsing -> jvm [style=dashed]
165+
166+
// Undecidability
167+
complexity -> undecidability [style=dashed]
168+
jvm -> undecidability [style=dashed, label="programs\nas data", fontsize=9]
169+
}

lectures/java_rep/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<h1>Representing Java Values</h1>
1+
<h1>Representing Values</h1>
22

33
<h2>The Java language abstraction vs. hardware implementation</h2>
44
<p>

lectures/preface/dependencies.png

181 KB
Loading

lectures/preface/index.html

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,18 @@
11
<h1>Preface</h1>
2+
23
<p>
34
This online book is intended to support a second-semester computer science
45
course, one that focuses on material that would be useful to a professional
56
software developer. It explores how to use object-oriented programming to
67
effectively build complex code, including ideas from software engineering
7-
“in the small.” It also covers a variety of important basic algorithms and data structures,
8-
using them to develop a stronger foundation for thinking about correctness
9-
and performance. The reader is expected to have some basic familiarity with
10-
programming, and to feel comfortable with concepts such as variables,
11-
functions, arrays, and loops. The book uses Java as the programming
12-
language, but the reader's prior experience does not need to be with Java.
13-
At the same time, it is not intended to offer comprehensive coverage
14-
of Java features.
8+
“in the small.” It also covers a variety of important basic algorithms and
9+
data structures, using them to develop a stronger foundation for thinking
10+
about correctness and performance. The reader is expected to have some
11+
basic familiarity with programming, and to feel comfortable with concepts
12+
such as variables, functions, arrays, and loops. The book uses Java as the
13+
programming language, but the reader's prior experience does not need to be
14+
with Java. At the same time, it is not intended to offer comprehensive
15+
coverage of Java features.
1516
</p>
1617
<p>
1718
Topics covered here include object-oriented programming, program
@@ -39,6 +40,19 @@ <h1>Preface</h1>
3940
on GitHub. Future planned improvements include more introductory material
4041
on programming in Java, and integration of exercises for the reader.
4142
</p>
43+
<h2>Structure</h2>
44+
<p>
45+
The book is divided into chapters, which need not be read in exactly the order
46+
they appear in the <a href="../../toc.html">table of contents</a>. The
47+
following diagram may help navigate your way through the material. Solid
48+
arrows represent strong dependencies between different topics; dashed arrows
49+
indicate where reading the prior material is useful but not required.
50+
</h2>
51+
52+
<div class=figure>
53+
<img src="dependencies.png"/ style="width: 100%">
54+
</div>
55+
4256
<h2>Additional functionality</h2>
4357
<p> Since this is an online book, some functionality is available that you don't
4458
get with conventional books. For example, there are some exercises inline (though

0 commit comments

Comments
 (0)