Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Drawing a Rectangle, Oval, and Square

 
Michael Taylor
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to write a program where the user clicks on a button labeled "Rectangle", "Oval", or "Square" and when that action is performed the appropriate shape is display. Can someone look at the partial code below and give me some pointers?


Any help would be appreciated.
Thanks,
Michael
 
Dirk Schreckmann
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Michael,
How have you considered organizing your project? What objects might the project need and what heirarchy might they create? Are you trying to work polymorphism into your project?
If you'd like to learn a bit about what polymorphism is, take a look at The "How My Dog Learned Polymorphism" Story in The Campfire Stories.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic