Download presentation
Presentation is loading. Please wait.
1
ADVANCED OBJECT-ORIENTED PROGRAMMING
8/6/2019© 2006 ITT Educational Services Inc. Structured Programming: Unit 6 Slide 1
2
Objectives Describe the benefits of object-oriented programming.
Describe how inheritance promotes reuse. Describe how an object-oriented approach supports the use of frameworks. Identify appropriate uses for inheritance and polymorphism. Design classes that implement inheritance. Design abstract classes. Identify the relationships between classes. Use UML to describe relationships between classes. 8/6/2019© 2006 ITT Educational Services Inc. Structured Programming: Unit 6 Slide 2
3
A Generalization/Specialization Relationship
8/6/2019© 2006 ITT Educational Services Inc. Structured Programming: Unit 6 Slide 3
4
Class Diagram- Employee Example
8/6/2019© 2006 ITT Educational Services Inc. Structured Programming: Unit 6 Slide 4
5
Employee Class Pseudocode
8/6/2019© 2006 ITT Educational Services Inc. Structured Programming: Unit 6 Slide 5
6
Faculty Subclass Pseudocode
8/6/2019© 2006 ITT Educational Services Inc. Structured Programming: Unit 6 Slide 6
7
Staff Subclass Pseudocode
8/6/2019© 2006 ITT Educational Services Inc. Structured Programming: Unit 6 Slide 7
8
Overriding and Base Methods
Employee ZapEmployee Faculty Staff ZapEmployee Faculty: Faculty1 Faculty1.ZapEmployee //actually calls Employee.ZapEmployee 8/6/2019© 2006 ITT Educational Services Inc. Structured Programming: Unit 6 Slide 8
9
Class Diagram- Account Example
8/6/2019© 2006 ITT Educational Services Inc. Structured Programming: Unit 6 Slide 9
10
Association - Works for
8/6/2019© 2006 ITT Educational Services Inc. Structured Programming: Unit 6 Slide 10
11
Examples of Multiplicity
8/6/2019© 2006 ITT Educational Services Inc. Structured Programming: Unit 6 Slide 11
12
Association - Holds 8/6/2019© 2006 ITT Educational Services Inc.
Structured Programming: Unit 6 Slide 12
13
Aggregation – Example 1 8/6/2019© 2006 ITT Educational Services Inc.
Structured Programming: Unit 6 Slide 13
14
Aggregation – Example 2 8/6/2019© 2006 ITT Educational Services Inc.
Structured Programming: Unit 6 Slide 14
15
A Frame for Measurement Conversion
8/6/2019© 2006 ITT Educational Services Inc. Structured Programming: Unit 6 Slide 15
16
Composition – Example 1 8/6/2019© 2006 ITT Educational Services Inc.
Structured Programming: Unit 6 Slide 16
17
Composition – Example 2 8/6/2019© 2006 ITT Educational Services Inc.
Structured Programming: Unit 6 Slide 17
18
Event Planning Problem
8/6/2019© 2006 ITT Educational Services Inc. Structured Programming: Unit 6 Slide 18
19
Inner Classes Monthly Inventory private x Exceptions Write x
8/6/2019© 2006 ITT Educational Services Inc. Structured Programming: Unit 6 Slide 19
20
Summary In this unit, students learned: Benefits of inheritance
Using inheritance Protected properties Overriding methods Polymorphism Abstract classes Binary association Self-association Multiplicity Aggregation relationships Composition relationships Inner classes 8/6/2019© 2006 ITT Educational Services Inc. Structured Programming: Unit 6 Slide 20
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.