Object-oriented version of the Slots program for CS2163