adding polymorphism for the student class