Assignment 3 along with switch statement made to class example