20-09-2012, 03:49 PM
Object Oriented Programming: Its Origins and Importance in Computer Science
Object Oriented Programming.ppt (Size: 1.54 MB / Downloads: 163)
Computer Programming
The history of computer programming is a steady move away from machine-oriented views of programming towards concepts and metaphors that more closely reflect the way in which we ourselves understand the world
Programming progression…
Programming has progressed through:
machine code
assembly language
machine-independent programming languages
procedures & functions
objects
“Intrinsic Power” vs. “Effective Power”
This progression is not a matter of “intrinsic power”
Anything you can do with a minimally capable computer language, you can theoretically do with any other minimally capable computer language
But that is like saying a shovel is theoretically as capable as a tractor. In practice, using a shovel might make things very hard…
Classes and Objects
A class is a prototype for creating objects
When we write a program in an object-oriented language like Java, we define classes, which in turn are used to create objects
A class has a constructor for creating objects
Definition of an “Object”
An object is a computational entity that:
Encapsulates some state
Is able to perform actions, or methods, on this state
Communicates with other objects via message passing
1) Encapsulates some state
Like a record in Pascal, it has a set of variables (of possibly different types) that describe an object’s state
These variables are sometimes called an object’s attributes (or fields, or instance variables, or datamembers, or …)
History of Object-Oriented Programming
Started out for simulation of complex man-machine systems, but was soon realized that it was suitable for all complex programming projects
SIMULA I (1962-65) and Simula 67 (1967) were the first two object-oriented languages
Developed at the Norwegian Computing Center, Oslo, Norway by Ole-Johan Dahl and Kristen Nygaard
Simula 67 introduced most of the key concepts of object-oriented programming: objects and classes, subclasses (“inheritance”), virtual procedures
The Ideas Spread
Alan Kay, Adele Goldberg and colleagues at Xerox PARC extend the ideas of Simula in developing Smalltalk (1970’s)
Kay coins the term “object oriented”
Smalltalk is first fully object oriented language
Grasps that this is a new programming paradigm
Integration of graphical user interfaces and interactive program execution
Bjarne Stroustrup develops C++ (1980’s)
Brings object oriented concepts into the C programming language
Encapsulation
The main point is that by thinking of the system as composed of independent objects, we keep sub-parts really independent
They communicate only through well-defined message passing
Different groups of programmers can work on different parts of the project, just making sure they comply with an interface
It is possible to build larger systems with less effort
Conclusions
Object-oriented programming provides a superior way of organizing programming projects
It encourages a high degree of modularity in programming, making large projects easier to implement
It provides powerful techniques like inheritance and polymorphism to help organize and reuse code
Object-oriented languages like Java both provide a good environment for beginning students to learn programming, and match real-world developments in computer programming