20-CS-122-001 Computer Science II Spring 2012
Virtual Function Example
A general list class allowing comparison between objects of different classes

Virtual functions, classes, inheritance, lists, queues, stacks, applications

    object.h
object.cc
    Objects to be stored in the list require implementing methods for
determining type and for testing equality
 
    ident.h
ident.cc
    Objects of a subclass of class Object are given an identity number
that is unique to that subclass. Identity numbers of two objects must
match before two objects are compared.
 
    person.h
person.cc
    A Person class - identified by a character string, comparison is
on that string. Type number is given in the include file.
 
    number.h
number.cc
    A Number class - identified by an integer, comparison is on that
integer. Type number is given in the include file.
 
    list.h
list.cc
    The LinkedList class - comparison in on equality of all members
stored in the list. Type number is given in the include file.
 
    lvmain.cc
Makefile
    An example showing the use of the LinkedList class
and the Makefile for compiling all the modules.