Modularizing Your Code We learned in chapter 6 the technique of “Modularizing Yo
Modularizing Your Code
We learned in chapter 6 the technique of “Modularizing Your Code”. This technique is used to break a complex program into small, manageable modular pieces called Methods. A method is a collection of statements that performs a specific task. We learned that methods are mainly two types, the void methods and the value returning methods. Please discuss these two types. In your discussion cover the following:
Explain the void method.
Explain the value returning method.
Compare and contrast (showing similarities and differences) between the two types. For example, show the common features that any method must have. Also, show how method header and body can be different in each type.
Discuss different examples that requires the use of the void method.
Discuss different examples that requires the use of the value returning method.
Argue whether we need both types or one is enough and can be used with all scenarios.