By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,158 Members | 917 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,158 IT Pros & Developers. It's quick & easy.

i cant do this!

P: 2

maybe i'm a new coder from this post or discussions etc. but i cant do this. can you help me ?

its about polymorphism. Implement a shape hierarchy with Shape as an abstract base class that has pure virtual methods draw and resize. Derived classes should include Point, Line, Circle, Triangle and Rectangle.Each derived class implements the draw method to print out an appropriate representation of an object in the class and the resize method to change an objectís initial size. In main() implement a menu for user to select which object to be created and give input values for the dimensions. Call draw and resize methods for objects.
Apr 26 '07 #1
Share this Question
Share on Google+
3 Replies

Expert 100+
P: 181

This link gives some introduction to virtual base class and over riding. its better you do this your self, though it might take some time, you would be beneifited
Apr 26 '07 #2

P: 2
yep! i saw it but i need a working exe and working codes. can you help me?
Apr 26 '07 #3

Expert 10K+
P: 11,448
(see title) my grandfather would've slapped you on the back of your head for
saying this and then he would've told you: "when you *want* to do something
you *can* do it". So start reading, designing and coding and then come back
here when you're stuck with something. We most certainly are not going to
hand you out executable code nor the complete source code.

kind regards,

Apr 26 '07 #4

Post your reply

Sign in to post your reply or Sign up for a free account.