March 2013
Intermediate to advanced
1000 pages
34h 51m
English
In my REALbasic book, I summarized the nature of objects in two phrases: encapsulation of functionality, and maintenance of state:
As an example, imagine an object whose job is to implement a stack — it might be an instance of a Stack class. A stack is a data structure that maintains a set of data in LIFO order (last in, first out). It responds to just two messages: push and pop. Push means to add a given piece of data to the set. Pop means to remove from the set the piece of data that was most recently pushed and hand it out. It’s like a stack of plates: plates are placed onto the top of the stack or removed from the top of the stack one by one, so ...
Read now
Unlock full access