Object Programming  «Prev  Next»
Lesson 7

Object Oriented Programming Conclusion

This module delved into object-oriented programming (OOP) and its relevance to Java. You started out the module by learning about objects and classes, which form the basis for OOP. You also learned about inheritance, which allows classes to inherit functionality from other classes.
To summarize what was previously discussed, Java is an object-oriented programming (OOP) language. Object orientation helps a developer to achieve a modular, extensible, maintainable, and reusable system. To write good-quality programs, a programmer must have a firm command of OOP concepts. Object-oriented programming revolves around the concept of an object, which encapsulates data and behavior acting on the data together.
An object provides its services through a well-defined interface. This interface specifies "what" the object offers, abstracting "how" (actual implementation). Object orientation provides support for modeling solutions at a higher level of abstraction in terms of classes, a hierarchy of related classes (inheritance), association among classes, and dynamic binding (dynamic polymorphism). For any OCPJP exam, you are expected to know essential OOP concepts.
The foundations of OOP are:
  1. abstraction,
  2. encapsulation,
  3. inheritance, and
  4. polymorphism.
The concepts related to classes covered constructors and access modifiers in detail.

Essentials of OOP

To get a sense of the world of object-oriented programming, take a mental stroll around the television department of your local consumer electronics retailer. A television is an abstraction that offers certain functionality through the proper interface (a TV remote). As a viewer, you need not understand how the TV works; the TV abstracts all the details of its operation from the viewer (abstraction). A television object encapsulates properties of the television (such as brightness, channel number, and volume) and associated behavior to control these properties in a single entity (encapsulation). In other words, the access to these properties is restricted to the associated operations. There are different types of televisions, such as CRT television, LED television, and LCD television; they belong to a single family forming an inheritance hierarchy. Although all types of televisions support "display" functionality, the internal technology enabling the display of content may differ (polymorphism). With this television analogy in mind and with the help of the programming examples discussed in this module, you now have a better understanding of OOP concepts.

Ad  Java 12 Pogramming

Glossary terms

This module discussed how the following terms relate to Java:
  1. Object-oriented programming (OOP): Object-oriented programming is the implementation of a program or algorithm using objects.
  2. Object: An object is a collection of data and the procedures (methods) that act on that data.
  3. Class: A class is a template that defines the implementation of an object, effectively acting as a blueprint for the object. A class defines data and methods and is a unit of organization in a Java program.
  4. Inheritance: Inheritance is the ability to derive new classes from existing classes in object-oriented programming.
  5. Method: A method is an isolated section of code in an object that performs a particular function.
  6. Message: In object-oriented programming, sending a message to an object to invoke a method is similar to calling a procedure in structured programming languages.

Java Programming Research

Do you have any questions regarding Java or web programming?
Click the Search button at the top of the page to conduct additional research.

Object Programming Quiz

Click the Quiz link below to test what was explained in this module.
Object Programming - Quiz