class definition exercises