Create Larger Applications Organized Into Methods That Allow You To Understand Each Part
After creating your first application, you’ll want to program something bigger. Something that does more than print a few lines of text. What you’ll find though is that your program quickly becomes hard to understand. It will be hard to change. Hard to add new behavior. And much too long.
You need to divide your application into smaller pieces of code. These are called methods. And this class will show you how to:
- Declare methods so your code knows what to expect.
- Name your methods so you’ll know at a glance what the method does.
- Call methods and pass arguments that change the method’s behavior.
- Return information from a method that your code can use.
- Place methods in separate source code files so they’re organized better and you can find the one you want when you need it.
By the end of this class, you’ll be ready to write bigger and longer applications that do more and at the same time keep the level of complexity down so you can understand it.