#ABAP High Scores 2 tests with no tasks failing

1 messages · Page 1 of 1 (latest)

copper wagon
#

The tests fo the 3 tasks that have been described are passing. But then there are 2 tests that just won't work. Instructions:
Your task is to write methods that return the highest score from the list, the last added score and the three highest scores.

I have done that and it works, but then there are still fails.

inland niche
#

The "Some exception raised" error message is (in my experience) a exception happening in your code. Like if you have table with 3 elements and you try to access the entry in index 4. Or dividing by 0.
Happened a few times to me.

Let me look at your code, maybe I find the "feature" 😉

#

Ok I see the error (which I had as well). If for example only 2 scores are provided to the class you return the top 3 with your code.
I won't give the solution but just let you know that there is an indexing problem 🙂

copper wagon
inland niche
#

FYI you can go to the Tests tab on the right side and have a peak at the testing cases

#

(if you use the web based IDE)

#

I did not paste the code but used an image instead bc pasting the code includes a ton of (hard to remove) emtpy rows

copper wagon
#

Ah I see I see I will have a look at that

#

Yep that was the problem

inland niche
#

😂