commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Herbert <alex.d.herb...@gmail.com>
Subject Re: [GSoC][Commons][Statistics][Descriptive] Mean should be initiated with 0 or NaN ?
Date Sat, 20 Jul 2019 08:35:17 GMT
On Sat, 20 Jul 2019, 02:00 Virendra singh Rajpurohit, <
virendrasinghrp@gmail.com> wrote:

> >
> > The code just needs to move the logic for checking if there are any
> values
> > (count > 0) into the getMean() method and return appropriately. This
> should
> > be added to the contract of Mean by putting into the Javadoc and adding a
> > test to ensure it does work.
> >
>
> Hi Alex,
> I'm sorry but I don't get what you mean by, "This should be added to the
> *contract* of Mean" here.
> Please elaborate.
> Thanks
>

The 'contract' is the specification of the behaviour of the code. Someone
should not have to read the code to know what it does. The javadoc should
contain all behaviour that the user can expect.


>
> Warm Regards
> --
> *Virendra Singh Rajpurohit*
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message