School project - Thread sync, Abstract classes