CS 331 Spring 2013  >  Assignment 5

CS 331 Spring 2013
Assignment 5

Assignment 5 is due at 5 p.m. Thursday, March 28. It is worth 20 points.


E-mail answers to the exercises below to ggchappell@alaska.edu, using the subjectPA5”.

Exercises (20 pts total)

Exercise A — Basic Python


In this exercise, you will write some simple Python functions and a class.


Write Python 3.x code meeting the requirements outlined below. Place all of this in the file pa5.py.

The file should define the following.

General Requirements


Test Program

A test program is available: pa5_test.py. This will test whether your package works properly.

To do the testing, place the test program and your file (pa5.py) in the same directory, and run the test program (e.g., at a Unix prompt, type “python3 pa5_test.py”).

Do not turn in pa5_test.py.

CS 331 Spring 2013: Assignment 5 / Updated: 27 Mar 2013 / Glenn G. Chappell / ggchappell@alaska.edu