"Jacob Read" <23*7*9*
6@s*u*e*t*u*a*e*u*a*> wrote:
> While this has been asked indirectly previously, is the constructor for the Empty class strictly necessary, as it's redundant due to the implicit constructor already allocating required memory and no variables needing to be initialised with specific values or passed at all to the object.
>
> While I understand this makes no difference to code functionality, I would rather reduce redundancy, although don't want to incur any possible penalties from one branching choice or the other.
>
> Thank you,
> Jacob Read
The specification does not explicitly require you to write a constructor for every class, and I do not see where in the rubric you would lose marks for not writing a pointless constructor.
It definitely wouldn't affect correctness, so the only place you could lose marks would be style, but there is no reason for omitting pointless code to cost you style marks.
I think the only reasonable interpretation of the spec is that you are safe to omit it.