Class definition for Assignment 2