Download presentation
Presentation is loading. Please wait.
Published byCamilla Gilbert Modified over 9 years ago
1
Computer Science and Software Engineering© 2014 Project Lead The Way, Inc. Procedural Abstraction Object-Oriented Code
2
Remove details Generalize Example: Sink faucet – we know how to use it, but we often ignore details of how it works Easier to handle complexity if we don’t think of all details at once Abstraction
3
Separation of concerns Example: Sink faucet – we know how to use it, but we often ignore details of how it works Easier to handle complexity if we don’t think of all details at once Abstraction
4
Bits on Tape
5
The Earliest Objects © 1993 ACM, The Early History of Smalltalk by Alan Kay
6
Object-Oriented Code Methods Attributes
7
Programming Paradigms Imperative Programming One statement after another Procedures used to organize code Functional Programming Statements grouped in functions Functions transform data Object-oriented Programming Data associated with its own procedures
8
Object-Oriented Code Class Objects Class Data Attributes
9
Objects Are Instances of a Class Data Objects
10
Uniform Markup Language
11
Class Definitions in Python To instantiate:
12
Using attributes of a class To refer to an attribute:
13
Using methods of a class To call a method:
14
Using methods A common error: using too many arguments
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.