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


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

Login to reply

👍?
helpful
9:00pm Mon 20th May, ANONYMOUS

If Student.getMark(x) returns null, does this mean they haven't taken unit x? E.g, for task 9 we should filter over Students that return null? * @re*u*n An iterator over the students who have taken `unit`, from newest to oldest. */


SVG not supported

Login to reply

👍?
helpful
12:03pm Tue 21st May, Andrew G.

ANONYMOUS wrote:

If Student.getMark(x) returns null, does this mean they haven't taken unit x?

E.g, for task 9 we should filter over Students that return null?

 * @return An iterator over the students who have taken `unit`, from newest to oldest.
 */

I will draw your attention to the documentation of the Student.getMark() method

    /**
     * Returns the mark this student got in a given unit.
     *
     * <p>Returns `null` if the student has not completed the unit.
     *
     * @param unit The unit code to get the mark for.
     * @return The mark this student got in the given unit, or `null` if the student has not
     *     completed the unit.
     */
    Integer getMark(String unit);

which explicitly states that it returns null if the student has not completed the unit. If a student has taken a unit, then they will have completed it and received a mark. Otherwise they will not have.

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