object oriented programming sample code