Modified Grade class to use switch statement