Now that we know some basics…
The basics of process control:Conditional statementsandLoops.
…We are set to discussMethods.
AMethodis a self-contained block of code that ‘does something’.
In other words, it performs its own isolated task.
Can be thought of as a ‘mini-program’.
Methods are thus very useful for modularizing our program:
Organizing code into logical, independent tasks;
This is helpful forRe-usability…
Also helpful for easyprogram maintenance.
Required changes to update a method’s behavior are made in themethod…