Code Documentation:
Say I have an example class TestClass with three functions a(), b(), c() and a class SecondClass with
two functions e() and f(). should be laid out in the following way:
TestClass.a():
description goes here
TestClass.b():
description goes here
TestClass.c():
description goes here
SecondClass.e():
description goes here
SecondClass.f():
description goes here
This is done for all classes you define. Only your Kotlin code should be discussed. The XML
should be left out.
For the purposes of code documentation lets assume I have a function sum() that looks like this
fun sum(nums: Array<float>) : float {
var total = 0.0
for(int i = 0; i < [Link](); i++)
total += size
return total
}
an example of good documentation for this would be
[Link](nums):
Takes in an array of floating point numbers and iterates through them to produce the overall
sum of those numbers which is return to the user
an example of bad documentation would be
[Link](nums):
initialises a variable total to zero then does a for loop from i to [Link](). In the loop we
add size to total before returning total after the loop