Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

a new method

 
Randall Twede
Ranch Hand
Posts: 4385
3
Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i thought this was pretty funny so, even thought the joke was on me, i am sharing.

i have been refactoring a program i wrote in CC in 2004 to fit the MVC framework i used the next year at university. i succeeded in refactoring it but there is a logic error. it might have been there in the original program, i'm not sure yet. it uses a custom PersistentLinkedBinaryTree class. because of this error i decided it would be nice if i could "erase" the knowledge base saved in this tree. i also thought the user might want to do the same.

so, i created a new MenuItem, constant, if in actionPerformed(), and the clincher, a new method in Model called new().

i bet you can imagine what the compiler thought of that!
 
Hebert Coelho
Ranch Hand
Posts: 754
Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If it was working back than, you did a great job! =P
 
Randall Twede
Ranch Hand
Posts: 4385
3
Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks, i was on top of my game back then. but you know how it is with homework. no time for extensive testing.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic