01-11-2012, 01:56 PM
Introduction to Object Oriented Programming
Object Oriented.ppt (Size: 41 KB / Downloads: 29)
Software is Hard
Because:
Creative
Solving new problems or adapting to changes
Complex
Lots of interacting parts & dependencies
Changeable
Controlling the change is a challenge
How do we solve the crises?
Experience
One problem may be similar to another one
Estimation
System Engineering & Project Development
Requirements Design Implementation Test
Tools
Let the language do as much for us as possible
Object Oriented Programming
Paradigm
A way of thinking
Assumptions & Rules
Traditional Languages
Procedural
Like a recipe
OOP
The world is made up of objects and the interaction between them
Object Oriented Programming:Messages
Communication with Objects is through messages
In Java: we call an object’s method
The arguments and return values are the content of the message
This avoids direct manipulation of an object’s state
Encapsulation & Data Hiding
This is a good thing
The life and times of an Object
Definition
Define the class for this type of object
Declaration
Create a specific name for one of these types of objects
Instantiation
Create the object associated with the name
Set aside memory
Identify associated methods
Initialize the Object's data & state
Use
Things can change and happen
Destruction
Allocated memory is returned to the system