Object oriented programming is a programming paradigm that attempts to make programs more closely model the way people think about and deal with the world. In OOP, a program consists of a collection of interacting objects. Each object in a program represents an item that has a job to do.
The world in which we live is filled with objects. For example, an object we are all familiar with is a drawing tool such as a pencil or pen.
In order to use an object within a program, we need to provide a definition for the object. This definition is called a class in Java (see Lesson 1-B). A class can be thought of as a mold, template, or blueprint used to create objects.
The attributes and behaviors of an object can be summarized in a class diagram. A class diagram is an outline of the attributes and behaviors for a given type of object.
Because a class is a blueprint for an object, you can create many objects from one class where each of those objects keeps track of its own attribute values.
The same is true for people! We are all built from the same genetic code that makes us human, but the values of our individual attributes such as height, hair color, gender identification, etc. are unique to each of us.
Last modified: December 12, 2022
Back to Classes In Java