class converters

Got it! Rather than think of classes as objects, think of them as containers for groups of related actions.

I now have my first abstract object: a function to convert four digits of zeroes and ones from Gray Code to Base 10. My genetic algorithm sketch doesn’t require conversion in the other direction or alternative class constructors to handle different quantities of digits, but it would be simple to add the required functions to the class. Next subject for a class: breeding new generations of webs.

Tags:

Thursday, August 12th, 2010 coding

Leave a Reply