class person {
	public:
		virtual void walk () = 0;
		virtual void run ();
};

class student : public person {
	public:
		void enroll ();
		virtual void walk ();
};

class freshman : public student {
	public:
		void enroll ();
		virtual void run ();
};

// What's legal, which function is called ?

int main () {
    person paula;
    student *stu= new freshman ();
    stu->enroll ();
    student sara = *stu;
    sara.run ();
    person *pp = stu;
    pp->run ();
    pp->walk ();
    freshman *fred = pp;
    fred->enroll ();
}
    

Click here for solutions