[Tutor] Follow up to 'class data'

fleet@teachout.org fleet@teachout.org
Mon, 3 Dec 2001 12:44:59 -0500 (EST)

I think I'm stuck in the "just don't get it" class (pun intentional).

"Everything is an object" includes, I guess classes.

So to me, the address book is an object and can be a class?

But the example seems to ignore "address book" and describes the means of
adding, modifying, deleting data as classes.  ??

I would have thought "address book" would be the class and the means of
adding, modifying, deleting data would be "methods."

Since the actual data (names, addresses, phone numbers, e-mail addresses,
etc.) will need to be stored in dictionaries, lists, text files, etc.,
what is the advantage of using classes as opposed to functions.  Or are we
just talking about 'another way to do it?'

The structure as I see it would be something like:

class AddressBook:
   def input:
   def modify:
   def delete:
   def search:
   def sort:
   def output:

Should I be looking at something like:

class AddressBook:
   class Input(AddressBook):
      def inputName:
      def inputAddress:
      def inputPhone:


				- fleet -