Make trap class inherit object class