Object Oriented Programming Lecture 10 UML CRC To

Object Oriented Programming Lecture 10: UML & CRC

To Do l Read Chapter 3 – Think about the questions

Notations l l CRC cards Unified Modelling Language (UML) – – Booch, Grady and Rumbaugh Class Diagrams Sequence Diagrams Object Diagrams

CRC Card l l l Class, Responsibility and Collaboration Cards Ward Cunningham and Kent Beck (Tectronix) 4 by 6 inch index cards (small) Class Name Responsibilities / Secrets Collaborations

Class Diagrams l Boxes represent classes – – – l l Name of class Attributes – or data held in the class Operations – or methods provided by the class Lines represent associations between classes Arrows on the lines represent navigability Numbers on the lines represent multiplicity Open arrow heads show generalisation or viewed the other way inheritance

Class Diagram Name Attributes (Data) 1 * Operations (Methods) Name Attributes (Data) Operations (Methods)

ball. World ball one ball two paint(Graphics)

: Ball. World colour: green ballone : Ball colour: red balltwo : Ball colour: green

: Ball. World colour: green ballone : Ball colour: red balltwo : Ball colour: green exitbutton caption: Exit

Practicals for week 3 l l l Chapter 6 questions 1 -14 Exercises 1 -4, 6 To be verified are exercises 1 -4 as a single program and 6 as a second program
- Slides: 10