Lecture # 10
Lecture # 10
Universal Polymorphism
True polymorphism
Semantic Reuse
Overloading
rectangle rect;
triangle trg;
shape *sh1=▭
shape *sh2 = &trg;
sh1->setvalues(5,4);
sh2->setvalues(5,4);
cout<<rect.area()<<endl;
cout<<trg.area()<<endl;
return 0;
}