Before I receive critism for the lack of angular momentum or just straight up momentum in my engine (yeah it's starting to sound bad) keep in mind I wrote this code when I just started taking Gr 11 Physics, when all mattered were the velocities of objects. If you're having trouble searching for the sacred source code, take a look within the "Physics Object" class. It handles collisions and includes gravity.
If you're feeling brave, take a look at my portal class to see how I managed to implement a portal gun! I honestly don't plan on remaking the physics engine for Greenfoot so I'll let another deranged high schooler to share their code with the world.