For our last example, let's think about a local post office. It's a separate, self-contained environment that has properties, such as a physical address (a variable), and the ability to execute actions, such as sending in your secret decoder ring voucher (methods).
This makes a post office a great example of a potential class that we can outline in the following block of pseudocode:
PostOffice
{
// Variables
Address = "1234 Letter Opener Dr."
// Methods
DeliverMail()
SendMail()
}
The main takeaway here is that when information and behaviors follow a predefined blueprint, complex actions and inter-class communication becomes possible.
For instance, if we had another class that wanted to send a letter through our PostOffice class, it wouldn't have to wonder where to go to fire this action. It could simply call the SendMail function from the PostOffice class, as follows:
PostOffice.SendMail()
Alternatively, you could use it to look up the address of the Post Office so you know where to post your letters:
PostOffice.Address
Your basic programming toolkit is now complete (well, the theory drawer, at least). We'll spend the rest of this section taking you deeper into the syntax and practical uses of variables, methods, and classes.