Pages

Tuesday, June 24, 2014

Finally simplified function calls

First of all, the new_client function has been renamed to new_household, since we are typically adding more than one client at a time.

Secondly, because we are adding multiple clients at once, it is necessary to keep relevant data together (e.g. one client may have a phone number while another may not, and we needed to associate these phone numbers with the correct first name, last name, and dob). We attempted to use lists and tuples to solve this problem, but the function calls become virtually indecipherable, and there was a lot of potential for index-out-of-bound and other errors. However, all of these issues have been resolved by creating a number of objects to hold the data that will be sent to the functions. This not only resolves a lot of errors, but also makes cleaner, easier to understand functions.

No comments:

Post a Comment