hash data structure oop practice