
Those two behaviors can be represented as “methods” in code, which you might remember from another earlier post. With the order example, it can be submitted or canceled. These objects can also have behaviors associated with them. This gives the code an organized structure that becomes more apparent with use and practice.Īnything, physical or abstract, can be as an “object” in code. The properties are represented a certain way in code and can be accessed throughout the app. Each item, like a pizza, is another “object” that has its own properties, like size and toppings. The user’s order is an example of an “object.” It has properties about it, like the user’s name, phone number, and items ordered. Let’s imagine that we are working on an app that let’s users order pizzas from a local restaurant. Objective-C is an “object-oriented” programming language, but what exactly does that mean? In an earlier post, I described how “an object-oriented language is one that is built around the concept of objects.” By that I mean that the programming language is used in such a way that real-world objects can be represented in code in an intuitive manner that makes sense.Īs is often the case, this is best illustrated with an example.
