Computer Science 225
Advanced Programming
Spring 2017, Siena College
Lecture 5: UML Object Diagrams
Date: Friday, February 3, 2017
Agenda
- Announcements
- If your group has not yet completed Lab 2, you have until
start of your lab period on Wednesday to wrap it up
- Homework Project 1: Chutes and Ladders simulation due tonight
- Homework Project 2: Chutes and Ladders Simulation Extended out,
due in two weeks (before you leave for the break) - assignment
details in Blackboard again
- UML object diagrams
- An example binary search tree implementation:
SimpleIntBinarySearchTree
- Constructing a UML class diagram for this example
- "HAS-A" associations for data members that are class references
- Constructing a UML object diagram for this example
- A UML object diagram is much like a "memory diagram",
showing instances of a class at a point in time during a
program's execution
- shows state of heap memory
- In-class exercise: write a recursive sum method
for the SimpleIntBinarySearchTree, other recursive methods
as time permits
Terminology
- "HAS-A" association
- UML object diagram
Examples