From the course: Java Object-Oriented Programming

Unlock the full course today

Join today to access over 23,200 courses taught by industry experts.

What is object orientation?

What is object orientation? - Java Tutorial

From the course: Java Object-Oriented Programming

What is object orientation?

- [Instructor] Everything we see, hear and experience in everyday life can be represented in code. In fact, it can be represented in a variety of different ways, depending on how the program's designed. Object-oriented programming is a programming model that can help make your code more flexible, reusable and easier to maintain. It's based around writing code that's modeled around objects and data. For example, if we wanted to represent a tree in code we could give it a height, trunk diameter, and anything else we wanted to know about the tree. These would be attributes, or data points of the tree. We could also give the tree a behavior, the ability to grow and this could change the value of its height and possibly other attributes. If these attributes and behaviors about the tree were contained in a single unit, we could say that it's organized around the tree object rather than a specific action or behavior. That's what…

Contents