It's UWAweek 24 (1st semester, 2nd exam week)

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 257 articles.
Currently 3 other people reading this forum.


 UWA week 21 (1st semester, week 12) ↓
SVG not supported

Login to reply

👍?
helpful
4:46pm Wed 22nd May, ANONYMOUS

Hi all, I have a question regarding the style marking for the project. Is it bad practice to define a custom class inside each of the methods for questions 1-7? Currently I define a custom class to return and then return a new instance of that class for each of the questions. This passes the tests and I cannot find any informations online saying that this is inherently bad practice. Any help would be appreciated. Thank you!


SVG not supported

Login to reply

👍?
helpful
5:16pm Wed 22nd May, Andrew G.

ANONYMOUS wrote:
> Hi all, > > I have a question regarding the style marking for the project. Is it bad practice to define a custom class inside each of the methods for questions 1-7? > > Currently I define a custom class to return and then return a new instance of that class for each of the questions. This passes the tests and I cannot find any informations online saying that this is inherently bad practice. > > Any help would be appreciated. > Thank you!
There is nothing about using "nested classes" (see also: "inner" or "local" classes) that is inherently poor style. You would not lose style marks simply for using them. Style marks are awarded on a number of categories per the marking rubric. Consider these categories when deciding whether to use various kinds of nested classes. Careless use of nested classes could make your code harder to read, but if you are careful not to let this happen, then there is no reason you could not get full style marks while using nested classes. Conversely, none of the style marks expressly require the use of nested classes or any similar feature. There are not a lot of hard and fast style rules, as there is no universal standard for style. Rather, style marks are awarded based on various indicators for writing code that another programmer can understand clearly. In reality the programmers in question will be your markers, but you should write your code as though it is going to be read by someone who has not seen a solution to the project before, and is trying to understand how you solved the problem. Code is read more often than it is written.


SVG not supported

Login to reply

👍?
helpful
7:32pm Wed 22nd May, ANONYMOUS

Thank you very much for your reply

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