//File : driver7.cpp //Author : Andre Long //Due : November 10, 2004 //Description : demostate virtual functions #include #include"shape7.h" int main() { triangle T (point(1,2), point(4,4), point(10,10)); circle C (point(6,6), 4); rectangle R (point(0,0), point(2,2), point(0,2), point(2,0)); shape *S[3]={&T, &C, &R}; for(int i=0; i<3; i++) { S[i]->draw(); cout<area(); } return 0; }