Selfmade implementations of different functions from Java made as school assignment