It's UWAweek 19 (1st semester, week 10)

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 3 articles in this topic
Showing 3 of 112 articles.
Currently no other people reading this forum.


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

Login to reply

👍?
helpful
12:46pm Mon 22nd Apr, ANONYMOUS

Should describe() print a string or returning a string when called? The constructor for empty class requires no arguments, however does it require anything within the {} to form an object in that class? ie) writing "public Empty{}" on it's own won't achieve anything will it?


SVG not supported

Login to reply

👍x1
helpful
1:20pm Mon 22nd Apr, Abdul M.

As we can see in the abstract class SetExpression, the signature of the describe() function is public abstract String describe(). It means that it must RETURN a string.

Because the Empty class doesn't have any properties, there is no way you require anything inside the {} block on the constructor.


SVG not supported

Login to reply

👍?
helpful
4:29pm Mon 22nd Apr, Andrew G.

ANONYMOUS wrote:
> Should describe() print a string or returning a string when called? > > The constructor for empty class requires no arguments, however does it require anything within the {} to form an object in that class? > > ie) writing "public Empty{}" on it's own won't achieve anything will it?
I will add: Please do not print anything. No part of the specification asks for you to print anything, and while doing so would not make your code wrong, and so would likely not cost you marks (except perhaps for style, given it is unnecessary mess), it will make marking your code more difficult.

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