Question about designing your own methods


In the challenge, I encountered another problem, re: designing the methods for calculating the values.

In the solutions here, there are two kinds of method declaring: one with arguments, one without.
In the end, I chose

-(float) valueInDollars {
    return currentSharePrice * numberOfShares;

but I saw other solutions here, with an argument thingy after the method, something like:

-(float) valueInDollars:(float)v {

Is one way better than the other?


This is a getter method:

      return currentSharePrice * numberOfShares;

computing and returning the value of the shares.

This one on the other hand:


sounds like a getter method but takes an argument, which is not the standard way of declaring a getter, and what it does is not clear.