From the course: Computer Science Principles: Programming

Unlock the full course today

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

Everything is an object

Everything is an object

- Object-Oriented programming is a core foundation of most coding and programming languages. To say something is object-oriented, or OO, means that everything, and I mean everything, is considered an object. But what is an object. I could pick up a pair of scissors and say that it is an object. But does that apply to programming. It actually does, and let me explain how. Think of a typical pair of scissors. Scissors can have different colors, lengths, or grips on the handles. Some scissors are designed for right-handed people, some for either, and some are for lefties. These are all characteristics of various types of scissors. Scissors can basically do one or two things. You can squeeze them together to cut, adjusting how much you want to cut based on the distance you squeeze. You can also open them up, and use them to open a box or a wrapper of some sort. These are actions that a scissor can do. At your house or office, you might have lots of different scissors. First, you know them…

Contents