The goal of this page is to provide high-level notes about what
we did in class each day - it is not meant as a guide for people
who miss class, but to help those who come to class remember
what we did and when.
Week of 1/19
-
1/20: Discussed some of the buzzwords
we will be studying this semester, such as requirements,
design, maintenance, re-use, program understanding, rapid
prototyping, procedural attachment, object-orientation.
1/22: Reviewed the syllabus and web page. Reviewed some of
the topics from 123 such as encapsulation, implementation
and interface files, information hiding.
Week of 1/26
-
1/27: Reviewed container classes such as arrays, stacks,
queues, ring buffers, lists, linked lists,
doubly linked lists, and bags.
1/29: Reviewed the first homework and bag classes. Went over
the Unix Make facility.
Week of 2/2
-
2/3: Discussed trees, terminology, breadth-first and depth-first
traversal. Ordered binary trees. Sample class prototype.
2/5: Discussed how to use the Unix Man pages to find
information (something of a failure). Developed a
simple program that
seeds the random number generator from the system date. Continued
discussing trees, including in-order traversal and usage of trees in
large scale applications such as chess, and scheduling.
Week of 2/9
-
2/10: Introduced templates, defined a simple scheme-like
list template class.
2/12: Revisited the scheme-like list template, then
designed a more encapsulated doubly-linked list class using a node
template class. Introduced the notion that templates put requirements
on the classes they are instantiated for - we used the example of
requiring the overloading the == operator in order to implement the
insertBefore method.
Week of 2/16
-
2/17: Introduced the notion of object modeling as a design
activity. Worked through an example in the college domain, we
identified some of the important object types, and then arranged them
in categories, noting their commonalities and differences, in
particular focusing on their attributes.
2/19: No class.
Week of 2/23
-
2/24: Began a breif review of OMT (the Object-Modeling
Technique). Covered taxonomies of classes, simple inheritance, and
began relational diagrams of classes. Discussed the use of methods in
C++ as active values to implement certain kinds of complex relations.
2/26: Continued the overview of OMT. Discussed
relational and taxonomic views of the object model, as well
as instance diagrams.
Week of 3/2
-
3/3: Handed out the OMT Object Model notation sheet and
explained most of the modeling notations.
3/5: This class was devoted to discussing aggregation.
We talked about (part-of) and generalization (subclass) as two forms
of abstraction with fundamental differences. We discussed the lack of
language support for aggregation, and then looked over examples of
programming support, such as methods that preserve the aggregate
structure by protecting slot access, and shadowing the aggregate
structure in constructor methods. We also looked at special kinds of
aggregate associations as examples of the "subset" constraint between
associations.
Week of 3/23
-
3/24: Our first day back from spring break was about as lively
as a cemetary. Despite the obstacles, we spent the time discussing
dynamic modeling by looking at dataflow diagrams. We discussed
dataflow, in terms of parameter passing and in terms of sequential
access to global variables, noting particularly that dynamically
allocated memory may be accessed through local variables (pointers),
but the values that the pointers point to are global.
3/26: We continued dynamic modeling and the use of state
transtition diagrams to model states and events, both internal and
external, that the system must be aware of.
Week of 3/30
-
3/31: The weather was almost too nice outside to warrant
holding a class, but we forged ahead. We went over the state
transition model, discussing aggregate states, the difference between
events, and states, and the use of events as transitions with guards
and associated actions.
4/2: We began a more detailed example from the book
Object-Oriented Modeling and Design by Rumbaugh, et al. We
began the example by defining the banking domain and software for
ATMs. We worked through a first draft of the object model for this
domain, and dicussed issues in further analysis and refinement of the
model, including aggregation, generalization through
superclasses, recognizing similar classes and attributes, naming
associations, etc.
Week of 4/6
-
4/7: Due to misconceptions of aggregation and generalization
in the projects, we covered these two relationships and how to use them
to model a domain. One way to think of a C++ class is as a set
definition, and some people were getting confused because an instance
of a subclass of a superclass is part-of the set defined by the
superclass (since the subclass relationship between two classes is
similar to the subset relation). In this case, however, you do not
use part-of to model
this relationship, you use subclass. We then covered virtual
functions in C++, and there is a working example on
line.
4/9: C++ virtual functions are an afterthought attempt to
address criticisms of C++ in light of languages that provide
dynamic objects. We discussed the notion of dynamic objects,
in particular run-time binding as opposed to compile-time, and the
additional features of dynamic object systems beyond virtual
functions, such as run-time queries regarding class membership, the
class hierarchy, generalizing or specializing an object, finding all
instances of a class, class variables, etc.
Week of 4/13
-
4/14: In the OMT, bi-directional associations imply that an
object will have a slot whose value is another object, and that other
object will have a slot whose value is the first object. This is
called an inverse. We discussed inverses, how to represent
them in code, particularly emphasizing that persistant stores do not
need to keep both ends of an inverse relationship, how to
automatically generate the inverse, problems with automatically
generating inverses, and some approaches to solving it.
4/16: We spent today covering the Unix file permissions and
Unix groups, and how to use these to facilitate working in groups. We
went over the Unix
chmod, and
chgrp
commands for setting file permissions and groups, discussed the set
group id bit and how to set it for a directory (chmod g+s ...),
how to use the Unix
ls -l
command to check file permissions and groups, and finally how to
create a link using the Unix
ln
command.
Week of 4/20
-
4/21: We spent the first half of the class discussing
encapsulation again, and focused on the idea that methods encode
knowledge about instances of the classes they are attached to.
We then reviewed the goal of Project 3 as one
supporting encapsulation, where the knowledge of how an object is
represented in a persistant store is important information about that
object and therefore should be encapsulated in the class by defining
methods. We also went over how this relates to ORB technology, and
also breifly discussed OLTP and client/server systems in general. The
second half of the class was spent introducing C++ iterators as
an abstraction that supports operations on sequences. We covered the
overloading of the ++, *, ->, and == operators for all iterators.
4/23: We covered the list template, showing an example of how to use it. We covered the standard methods, iterators, and algorithms
available for the list template, and the other C++ standard library
container templates.
Week of 4/27
-
4/28: Today was reserved for individual groups meetings to get
everyone on track for finishing.