Java Reference
In-Depth Information
Chapter 14
Object-Oriented Programming
Classes and Objects
A new approach to solving the software crisis, called object-oriented pro-
gramming was introduced to program developers during the early 1980s.
The idea behind object-orientation (often called OO) is to make program-
ming more real. Instead of dealing with abstractions and concepts that only
exist in the software world, OO programmers would model their products
using objects. These objects belonged to “classes of objects” that contained
the data structures and processing operations. The object-oriented ap-
proach proved to be a feasible alternative and is now a major force in the
computing mainstream.
Java is an object-oriented programming language. It uses classes and
objects, which are the fundamental elements of an OO system. Java also
implements the three conceptual mechanisms associated with ob-
ject-orientation: data abstraction, inheritance , and dynamic binding .
You have already learned that every statement and every construct of a
Java program must exist inside a class of objects. Because the Java librar-
ies, which are defined as classes, in order to use and understand Java you
must first grasp the fundamental notions of object-oriented program-
ming. This chapter is about object orientation and about classes and ob-
jects.
The Why and Wherefore of OO
The object-oriented approach dates back to the 1960s. The first notions of
data abstraction are due to Kristen Nygaard and Ole-Johan Dahl from the
Norwegian Computing Center. Simula, developed by Nygaard and Dahl,
was a language intended for simulations and for use in a field of mathemat-
Search WWH ::




Custom Search