CS 112

Lists and Sorting Lab

In this lab, we'll use what we've learned about inheritance, polymorphism, and linked lists to build a program that:

We'll begin by using the Person class included here.

You should create three subclasses of Person: Undergrad, GradStudent, and Professor (you may already have these laying around). Undergrads and GradStudents have two additional instance variables: GPA and Major. They should also implement printSelf(). PrintSelf should print out the person's ID, name, and Date of Birth. For students, it should print out their major. For Professors, it should print out their department.

Templates for each of the subclasses are here: