Object-Oriented Design
Budd’s Example: Ordering Flowers
Characteristics of an Object
Designing a System
Designing an Object
Implementing an Object
Example: A Program for Displaying Random Line Segments and Their Intersections
Sample Desired Result
Our Key Objects: Line Segments
Other Objects
Data Needed by LineSegment
LineSegment.java
In LineSegment.java -- Constructor
In LineSegment.java -- paint
LineSegment: computeIntersections
LineSegment: segIntersection
LineSegment: segIntersection (cont)
LineSegment: plotIntersections
The Class LSPoint
The Class LineSegmentCollection
LineSegmentCollection (cont)
Summary of Object-Oriented Design
Email: tanimoto@cs.washington.edu
Home Page: http://www.cs.washington.edu/people/faculty/tanimoto.html
Download presentation source