In Class: Week 11


Create a week11 subdirectory in your cs21/class directory and copy over some starting point files:

    $ cd 
    $ cd cs21/class
    $ pwd
      /home/your_user_name/cs21/class
    $ mkdir week11       

    $ cd week11
    $ pwd
      /home/your_user_name/cs21/class/week11

    $ cp ~newhall/public/cs21/week11/* .
	

We are going to do some of the following together:
  1. open account.py and add some of the missing methods to the Account class.

    As you implement each method, test it by adding calls to main. Try calls that will test different method return values. For example, if a method returns True or False, try one call that should return True, another that should return False.

  2. open listOfObjs.py. This is an example of creating and accessing a list of objects. Think very carefully about type to help you determine how to access and modify values: when the type is list, you can use indexing; when the type is object you can use dot notation to invoke its methods.

  3. open 2Dlist.py. This is an example of creating and accessing a 2-dimentional list in Python. A 2-dimentional list is a list where each bucket contains another list. Again, we need to think very carefully about type to determine how to access and modify values in a list of lists.

  4. open atm.py. We likely will not look at this in class, but if you want to play around with objects a bit more, you can try this out.

    This is the start of a not-very-secure ATM program. One special user is named admin with a pin 0000, the other users are bank account holders. If you log in as admin you have a different set of options than if you log in as a regular user. Try running and logging in as admin with a pin 000. Try some of the menu options to see what this program does for admin (not all admin features are implemented).

    Parts of the program are complete, but other parts are left for you to do. You will complete admin functionality, and add regular user functionality. As you add things, keep in mind a user is running this program and likely wants some feedback on operations they perform on bank accounts.

    The bank account data base is stored in a file, and read into a list of Account objects.

    Complete the missing functionality that operates on this list of Account objects. Add and test in this order: