课程: Java Object-Oriented Programming

今天就学习课程吧!

今天就开通帐号,24,600 门业界名师课程任您挑!

What is object orientation?

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…

内容