jgs
CSE 205
Object-Oriented Programming and
Data Structures
Lecture 05: Programming with Java IV
Dr. Javier Gonzalez-Sanchez
[email protected]
javiergs.engineering.asu.edu | javiergs.com
PERALTA 230U
Office Hours: By appointment
Javier Gonzalez-Sanchez | CSE205 | Fall 2021 | 6
jgs
Lecture 33
Recursion
§ How does it work
§ Understand factorial. Fibonacci, Searching, etc.
§ What about print numbers n to m?
§ What about add numbers 0 to n?
Slide 6
Slide 6 text
jgs
UML Diagrams
Slide 7
Slide 7 text
Javier Gonzalez-Sanchez | CSE205 | Fall 2021 | 8
jgs
Blueprint
Slide 8
Slide 8 text
Javier Gonzalez-Sanchez | CSE205 | Fall 2021 | 9
jgs
UML Diagrams
Slide 9
Slide 9 text
Javier Gonzalez-Sanchez | CSE205 | Fall 2021 | 10
jgs
UML Class diagram
§ The Unified Modeling Language
Class diagrams show the classes in a system
§ modifiers
§ Attributes
§ methods
And the relationships between these classes:
§ Association / Dependency (calling methods)
§ Aggregation / Composition (attributes)
§ Generalization / Specialization / Realization (inheritance)
Slide 10
Slide 10 text
Javier Gonzalez-Sanchez | CSE205 | Fall 2021 | 11
jgs
Class Name
Attributes variableName:type = initial value
Methods
methodName(parameterType):return type
UML Class diagram
Javier Gonzalez-Sanchez | CSE205 | Fall 2021 | 13
jgs
Object Oriented Relationships
Directed
Association
Aggregation Generalization Realization
Slide 13
Slide 13 text
Javier Gonzalez-Sanchez | CSE205 | Fall 2021 | 14
jgs
Questions
Slide 14
Slide 14 text
jgs
CSE 205 Object-Oriented Programming and Data Structures
Javier Gonzalez-Sanchez, Ph.D.
[email protected]
Spring 2022
Copyright. These slides can only be used as study material for the class CSE205 at Arizona State University.
They cannot be distributed or used for another purpose.