Chapter 3: Object methods

Object methods

face Josiah Wang

To recap, in this chapter, we have discussed that objects are more than just a data type.

You can have methods bound to an object, where an object can perform an action.

This “object centred” style of coding helps increase readability. It provides a higher level of abstraction, but at the same time makes your program seem more concrete, since you are now modelling your programs in terms of objects and what they can do. This makes it easier for you to ‘visualise’ your program in your mind.

Try to start thinking about your programs in terms of objects and object behaviour. In fact, this chapter serves as a gentle introduction to what is known as Object-Oriented Programming, where objects are the main stars of your program. As you progress in future lessons, I will start moving you towards an object-oriented style of programming. For now, try to get used to the idea of object methods!