-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Project stuck at Level 2 on Codecrunch but runs fine till Level 7 #581
Comments
can check if your parent Event class used "instanceof" any subclass? :) happened to me when i added instanceof RestEvent! |
No I dont use any instanceof in the parent Event class. Just that my each extending event(Arrive, Serve, done etc) |
I'm guessing DoneEvent and ServeEvent depend on each other. Happened to me before, my jshell worked but codecrunch was stuck at level 2. It was solved when the cyclic dependencies were resolved. Hope you can find the cyclic dependency and it should be fine after that! :) |
OH no |
yea, prof banned cyclic dependency on codecrunch |
This is because code crunch specifically checks for cyclic dependencies and will flag it out. The cyclic dependency is probably because execute() of DoneEvent returns serveEvent and execute of serveEvent returns DoneEvent. |
Oh yes thank you vm, I managed to just pluck out my function into my driver class. but now it has stopped on level 3 since the input is different. Must we create a Main method for each level? HOw does it work? |
Ok i guess i can vary with input |
yep can check length of args |
Description
Hi, my project runs fine on jshell for all levels.
For level 2 I javac all my neccessary files,
and it all works fine, but on CodeCrunch it fails to find my ArriveEvent class.
Might it be due to Cyclic dependency in my methods that string from ArriveEvent?
All my non Main class are packaged in the same cs2030.simulator
Topic:
Screenshots (if any):
The text was updated successfully, but these errors were encountered: