The exercise (in case you want to have a look at it)
(1) person paula; 
    Not allowed because the class person has pure virtual function (walk is
    pure virtual in class person). Thus it is an abstract class. And you can't
    create instances of an abstract class.
    
(2) student *stu = new freshman (); 
    Allowed because LHS is a pointer to student, and the RHS is a pointer to
    freshman. And it is perfectly legal to assign a pointer to a derived class
    to a pointer to a base class.

(3) stu->enroll(); 
    This is allowed. There are two potential candidates which could be invoked
        student::enroll()
        freshman::enroll()
    Now notice that enroll is not a virtual function. So, the function which
    gets invoked is determined by the static type (the declared type) of stu
    and not by its dynamic type (the type that it points to, which happens to
    be freshman). Thus student::enroll() is invoked

(4) student sara = *stu; 
    Perfectly OK. LHS is object of type student and so is the object on the
    RHS. You might argue that the dynamic type of the RHS is freshman because
    in (2), we made stu point to a freshman object. So, here is a rule of
    thumb. The only time the dynamic type of an object matters is when 
    you are invoking a virtual function and that too using either a pointer
    variable or a reference variable. On all other occasions, what you
    need to consider is the static type of a variable. 

(5) sara.run(); 
    The two possible candidates are 
        person::run()
        freshman::run()
    Note that sara is an object of type student. The class student does not
    have any implementation for the function run(). So, we go and look for the
    run() function in the class from which student is derived, ie the class
    person. And yes, we do find an implementation for run() there. So, the
    function invoked is person::run().

(6) person *pp = stu; 
    Yup, OK. LHS is a pointer to person and the RHS is a pointer to student.
    Note that again we are going to consider just the static types of pp and
    stu. The dynamic types come into play only when virtual functions are
    being invoked. And now pp points to an object of type freshman (recall
    that in (2), we made stu point to an object of type freshman)

(7) pp->run(); 
    Allowed. Now pp is a pointer and run() is virtual. So, you need to look at
    the dynamic type of pp. pp points to an object of type freshman. Thus, the
    function invoked is freshman::run().

(8) pp->walk(); 
    Again pp is a pointer, and walk is a virtual function. So, have a look at
    the dynamic type of pp. pp points to an object of type freshman. So, first
    look for the function walk() in the class freshman. No, such function
    exists. So, go up the hierarchy and look for a run() function in the class
    student. There exists one. So, the function invoked is student::walk()

(9) freshman *fred = pp; 
    Lets analyze this carefully. The static type of the LHS is pointer to a
    freshman and for the RHS, it is pointer to a person. So, we are trying to
    assign a pointer to a base class (person) to a pointer to derived class
    (freshman). This is not allowed. So, this is illegal. 

    You might find this a little hard to digest because at execution/run time,
    it is clear that pp points to an object of type freshman. And all we are
    trying to do here is to make a pointer of type freshman point to a
    freshman object. But then when you compile your code, the compiler wont be
    able to figure out what happens at the run time. 

    If you want to do something like this, then you have to explicitly use
    casting, as follows : 

       freshman *fred = (freshman *) pp; 

    Now putting that (freshman *) before pp means that you are telling the
    compiler, I know what I am doing ie. you tell the compiler that when on
    executing the program when I come to (9), I know that pp will be pointing
    to a freshman. If this last bit about casting does not make sense to you,
    you can ignore it. You are not expected to know it.