HasCycleException

14 views
Skip to first unread message

Dana Hurlbut

unread,
Apr 23, 2012, 9:55:20 AM4/23/12
to cs310_s12
Hi,

I'm wondering if I can get some help on the "HasCycleException" part
of pa5. I'm not sure how to make this work in the way that we're
supposed to. I understand what to do if I was allowed to put something
in the code like:

"if (topSorted.size()< vertexes.size())
throw new HasCycleException();"

but I don't know how to do it when "throws HasCycleException" is part
of the method declaration.

I'm wondering if there's something I can read to instruct me how to do
this. The book wasn't helpful.

Betty O'Neil

unread,
Apr 23, 2012, 10:01:43 AM4/23/12
to Dana Hurlbut, cs310_s12
This sort of code is fine, fits with the method declaration.--Betty O.

Dana Hurlbut

unread,
Apr 23, 2012, 12:46:46 PM4/23/12
to cs310_s12
Thanks so much. I got it working.
Reply all
Reply to author
Forward
0 new messages