It's UWAweek 17 (1st semester, week 8)

help2005

This forum is provided to promote discussion amongst students enrolled in CITS2005 Object Oriented Programming.

Please consider offering answers and suggestions to help other students! And if you fix a problem by following a suggestion here, it would be great if other interested students could see a short "Great, fixed it!"  followup message.

How do I ask a good question?
Displaying the 1 article in this topic
Showing 1 of 93 articles.
Currently no other people reading this forum.


 UWA week 17 (1st semester, week 8) ↓
SVG not supported

Login to reply

👍?
helpful
12:57pm Wed 24th Apr, Andrew G.

"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.

The University of Western Australia

Computer Science and Software Engineering

CRICOS Code: 00126G
Written by [email protected]
Powered by history
Feedback always welcome - it makes our software better!
Last modified  5:07AM Sep 06 2023
Privacy policy