L3-UML-Scanner-split1

L3-UML-Scanner-split1 - CSE205 Object-Oriented Programming...

Info iconThis preview shows pages 1–7. Sign up to view the full content.

View Full Document Right Arrow Icon
CSE205 Object-Oriented Programming and Data Structures
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
1-2 Outline Unified Modeling Language – UML String class Split method of the String class Scanner class
Background image of page 2
UML Diagrams UML stands for the Unified Modeling Language UML diagrams show relationships among classes and objects A UML class diagram consists of one or more classes, each with sections for the class name, attributes (data), and operations (methods) Lines between classes represent associations A solid arrow shows that one class uses the other (calls its methods)
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Class Name Attributes variableName:type = initial value Methods methodName(parameterType):return type Class Diagrams A class diagram consists of one or more classes, each with sections for the class name, Attributes (instance variables in Java), and methods, and describes relationship between classes.
Background image of page 4
Visibility Levels for Attributes Visibility Levels for attributes: public + private – protected # Ex. –address: String #idNumber: String +numCustomer : int Customer –address: String #idNumber: String +numCustomer : int
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Association – It can be used as a default relationship if the exact relationship is unknown. It is used when an object of one class is a local variable in a method of another class. In a UML class diagram, a solid straight line between two classes is used. Aggregation – An object of one class is a part of another class. It is used when an object of one class is an instance variable of another class. In a UML class diagram, a solid straight line together with a diamond shape is used. Inheritance – A class inherits instance variables and methods from another class. In a UML class diagram, a solid line with a triangle shape is used.
Background image of page 6
Image of page 7
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 04/18/2011 for the course CSE 205 taught by Professor Matasu during the Spring '08 term at ASU.

Page1 / 19

L3-UML-Scanner-split1 - CSE205 Object-Oriented Programming...

This preview shows document pages 1 - 7. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online