Re: [Tutor] Consolidate reused code blocks

2009-04-08 Thread David
Kent Johnson wrote: On Wed, Apr 8, 2009 at 8:38 PM, David wrote: Hi Everyone, I have a simple todo list program with functions to add, delete, edit and print out a list of todo's. I need to understand how to remove the same blocks of code I use in each function. Should I create a class for the

Re: [Tutor] Consolidate reused code blocks

2009-04-08 Thread Kent Johnson
On Wed, Apr 8, 2009 at 8:38 PM, David wrote: > Hi Everyone, > > I have a simple todo list program with functions to add, delete, edit and > print out a list of todo's. I need to understand how to remove the same > blocks of code I use in each function. Should I create a class for the same > block

[Tutor] Consolidate reused code blocks

2009-04-08 Thread David
Hi Everyone, I have a simple todo list program with functions to add, delete, edit and print out a list of todo's. I need to understand how to remove the same blocks of code I use in each function. Should I create a class for the same block of code I am including in each function? Here are two