Open SeanRobertDH opened 2 years ago
Qn 8 Is the UML diagram also not missing a condition in this diagram?
Qn 10
Without the constructors being included in the class diagram, Wouldn't it be wrong to assume that we can create a new Box with zero parameters? Because it's entirely possible that the constructor must have parameters but we do not have that information from the diagram.
Hmm for Q4:
Is it not a coding standard violation in that it is a magic literal?
Yes!
Q8: <being cheeky!> This error is not in the options. <being serious!> yes, this is an error that was missed in the image. (wrt answering the question, see above!)
Q10: The underlying assumption is everything is available in the code (but I think I understand your argument).
Thanks Prof @okkhoy for the quick reply!
Yeahh, Qn 10 seems kinda ambiguous given that the constructors were not included in the diagram.. I can't say that there is a constructor that accepts no variables so I would not know for certain if the code would compile..
hmmm since i saw a follow up question, I waited for a bit to answer if there are any more in the pipeline :-)
Yup. Understood your argument. If you find such ambiguities (hopefully none!) please include your argument/justification/assumption in the note->feedback so that I can take a look.
Qn 4
Hi Prof Akshay, with regards to this question, I was wondering why it is not a coding standard violation to not declare
5
atline 2
as a constant? Is it not a coding standard violation in that it is a magic literal?