Recently I had a Java exam at university. Usually how I prep for this kind of programming exam is studying with my best friend. We were studying object oriented programming using lists, double linked lists etc.
There were three tasks on the exam, the first one was about linked lists, the other two were some random math tasks. I did the first one and my friend did all three. We both got 0 points because our first task, which can only be done in two possible ways, was too similar. The obvious reason for this is because we spent quite some time studying together and using the same syntax.
I do not know what to do now and how to confront my professor without him getting mad and making it worse. I feel bad now and it hurts me much so I was thinking about dropping uni due to it's flaws.
Is there anything I can do to to recover from this?