Chapter 5. Using Functions
Down to the nitty-gritty
In the last chapter we took a good look at creating our own classes for our game. We know from our talk about inheritance that we can override functions of our superclasses, and we've done a bit of that already. But what are functions exactly, and how do we know when and where to use ones that already exist or when to create our own? In this chapter we're going to expand on our Awesome Game by taking a closer look at functions.
In this chapter we will:
Talk about what functions are and with what parameters and modifiers we can use with them
Discuss local versus instance variables
Take a look at commonly used functions and create our own as well
Talk about using the super, and also when NOT to use it
Take a look at delegates and how they are used
So with that, let's talk about functions.