Package account :: Module customer :: Class Customer
[hide private]
[frames] | no frames]

Class Customer

object --+
         |
        Customer

The class Customer represents customers in a simple (unrealistic) banking system. Each customer has a fixed customer ID number and a name.

Instance Methods [hide private]
 
__init__(self, id, name)
Creates a new normal customer with the given ID number and name.
 
get_ID(self)
Returns the customer's ID number
 
get_name(self)
Returns the customer's name.
 
set_name(self, new_name)
Sets the customer's name.

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, id, name)
(Constructor)

 

Creates a new normal customer with the given ID number and name.

Parameters:
  • id - the new customer's ID number
  • name - the new customer's name
Overrides: object.__init__

get_ID(self)

 

Returns the customer's ID number

Returns:
customer ID

get_name(self)

 

Returns the customer's name.

Returns:
customer name

set_name(self, new_name)

 

Sets the customer's name.

Parameters:
  • new_name - the name to be set for the customer