Introduction to Object-Oriented Programming - Semantic Scholar
Introduction to Object-Oriented Programming
? Objects and classes
? Encapsulation and information hiding
? Mental exercises
?
?
?
Classification and exemplification
Aggregation and decomposition
Generalization and specialization
? Inheritance
? Polymorphism and dynamic binding
? Java an example of an object-oriented programming language
?
?
?
Program example
History of Java
Comparison to C/C+
OOP: Introduction
1
Objects and Classes
Mammal
Two-legs
Very large brains
Omnivorous (plants + meat)
Mammal
Tusks
Four legs
Herbivorous (plant eater)
OOP: Introduction
2
The Object Concept
? An object is an encapsulation of data.
? An object has
?
identity (a unique reference)
?
?
state, also called characteristics (variables)
?
?
social security number (cpr), employee number, passport number
hungry, sad, drunk, running, alive
behavior (methods)
?
eat, drink, wave, smile, kiss
? An object is an instance of an class.
?
A class is often called an Abstract Data Type (ADT).
OOP: Introduction
3
The Class Concept
? A class is a collection of objects (or values) and a
?
corresponding set of methods.
A class encapsulates the data representation and makes data
access possible at a higher level of abstraction.
? Example 1: A set of vehicles with operations for starting,
?
?
stopping, driving, get km/liter, etc.
Example 2: A time interval, start time, end time, duration,
overlapping intervals, etc.
Example 3: A string, upper case, compare, lower case, etc.
?
?
str.equals(otherStr) ¨C class/Java style
strcmp(str, otherStr) ¨C C style
OOP: Introduction
4
Encapsulation and Information Hiding
? Data can be encapsulated such that it is invisible to the
?
¡°outside world¡±.
Data can only be accessed via methods.
Data
OOP: Introduction
send
message
Data
Function
Method
Function
Method
Function
Method
Procedural
Class
5
................
................
In order to avoid copyright disputes, this page is only a partial summary.
To fulfill the demand for quickly locating and searching documents.
It is intelligent file search solution for home and business.
Related download
- leccture 3 object oriented programming in java
- java 3 object oriented programming programmer books
- object oriented programming kandula yellaswamy
- object oriented programming in java southern adventist university
- lecture notes on object oriented programming through java iare
- object oriented programming oop a review colorado state university
- java object oriented programming example pdf webinar proposals
- introduction to object oriented programming semantic scholar
- introduction to object oriented programming exceptions
- object oriented programming basics with java university of san francisco
Related searches
- object oriented programming in matlab
- matlab object oriented programming pdf
- object oriented programming tutorial pdf
- object oriented programming book pdf
- object oriented programming c pdf
- object oriented programming 2 pdf
- object oriented programming pdf download
- object oriented programming c book
- object oriented programming java examples
- object oriented programming language pdf
- object oriented programming python pdf
- c object oriented programming examples