[cse491] convert to class

Alex Nolley nolleyal at msu.edu
Sun Oct 5 10:36:11 PDT 2008


->Could you explain a bit more of what you're thinking, though?  In
->particular, how would the function signatures (the arguments & return
->values) of the various functions change?

I see now. It would be very difficult to have the handle_connection,
delegate and serve functions part of a class since their input values would
take in 'self' in addition to their other variables. It wouldn't be a good
idea to use an all-encompassing class for these three functions.

->And have you thought about simply leaving the three functions I test
->alone, and then having delegate use a class to encapsulate information
->to pass around to handler functions?

This seems like a better solution. I can just call the constructor from
within delegate and then do individual function operations on the instance
of that class all within delegate. As long as delegate returns the right
values, it doesn't matter how it does this and the code should pass the
tests.

Thanks,
Alex




More information about the cse491-fall-2008 mailing list