In the previous chapters, we described the entities we derived from libraries as objects with no further explanation. For example, an entity describing a web page in our previous chapter was an object with its own values and methods—bound functions that seem to have access to objects internals.
In fact, we can create our own structures by defining classes. In this chapter, we'll do exactly that—learn how to define and make the most of classes and their properties. Along the way, we will use classes to create a rather complex system and monitor its behavior—something that classes are very good for. Because of that, classes are used extensively in games, computer graphics...in fact, any type of task where creating specific entities seems useful.
In this chapter, we will cover the following topics:
- Writing a class...