Faculty of Engineering and Mathematical Sciences 
Not logged in (login)

help2200


This forum is provided to promote discussion amongst students enrolled in Data Structures and Algorithms (CITS2200).
 
Options:
RSS cloud
Jump to:

Lab 4

2 of 251 articles shown, currently no other people reading this forum.
photo
From: ANONYMOUS
Date: Wed 25th Mar, 9:45am
Actions: 
        Login-to-reply
I wanted to ask about the ListLinked methods throwing an OutOfBounds exception. For 
some of them, the description says that they're supposed to throw that type of 
exception if the "window is outside the list".

Is that supposed to mean if the window doesn't exist in the list, or if there IS a 
window, but the list is empty? I assume it's the latter.

Lab 4

photo
From: ANONYMOUS  O.P.
Date: Thu 26th Mar, 1:29pm
Actions: 
        Login-to-reply
Actually, now I think it's if the window doesn't exist or it's outside the list. But for 
some reason when I put in the conditions for if: 

- the window does exist OR
- the window is not before first OR
- the window is not after last, 

it still executes the method instead of throwing an OutOfBounds exception even though one 
of the conditions is true. Is there some reason why this is the case?
This Page


Program written by: [email protected]
Feedback welcome
Last modified:  8:27am May 24 2020