Module 5: Writing Methods¶
In this unit, you will learn to write your own methods to reduce redundancy and improve code maintainability.
To get the exercises repository for modules 4-6, click here.
- Writing Methods
- Method Parameters
- Method Returns
- Method Comments and Conditions
- Code Practice with Arrays
- Studio 5: Writing and Testing Methods
- Studio Setup and Procedure
- Overview
- Methods
- A function-like method, distanceBetween()
- Running distanceBetween() tests
- Finishing testing distanceBetween()
- Adding another test for distanceBetween()
- Writing a void method, drawBullsEye()
- Finishing the code for drawBullsEye()
- Testing drawBullsEye()
- Array’s as parameters, arraySum()
- Finishing the code for arraySum()
- Testing arraySum()
- Finishing the code for arraySum() pt2
- Returning arrays in filledArray()
- Finishing the code for filledArray()
- Testing filledArray()
- Finishing the code for filledArray() pt2
- Writing methods from scratch & re-using methods in arrayMean()
- JavaDoc-style comment
- Testing arrayMean()
- Generating JavaDoc pages
- End of Studio Review
- Demo
- Assignment 5: Zombies: A METHOD to their Madness
You have attempted of activities on this page