Assignment 8
Due: 11:59 AM on Monday, December 8, 2008
Question
Write and document a Python script addmachGUI.py which implements
a GUI (using functions in module Tkinter) for an elementary
Decimal-based adding machine like that given in Diary script
addmach4.py. This GUI should have the
following basic capabilities:
- Set internally-stored quantity x to zero;
- Enter new quantity y;
- Select operation op in {+, -} to apply to x and
y;
- Set x = x op y;
- Display current value of x; and
- Exit GUI
Your GUI should allow any number of each of operations above (except the
last) in one GUI session. You may assume that all numbers and
operation-sequences are entered correctly, i,.e., no error-checking
or handling required. To obtain the up to 50% bonus marks, implement
additional abilities such as (but not restricted to):
- Other operations, e.g., {*, /, **};
- Function-operations, e.g., log2;
- Recall operation-application history of current GUI session;
- Error-handling, e.g., recognize invalid entered
floating-point numbers;
- Undo the last k operations for specified k >= 1;
- y-quantity entry using a simulated keypad;
- Super tricked-out overall GUI design, e.g., make
it look like a real calculator; and/or
- Have more than one internally-stored quantity (possibly
addressed by the register-names X1, X2, ..., XN)
and the ability to apply operations to or among these quantities.
Decisions on bonus marks will be made by your marker and cannot be
disputed.
Hints
You may find it useful to have a number of buttons with associated
callback functions to implement the various operations.
Submission
Please hand in printed copies of all of your Python script files as well as
a short (up to 1 page) file README.txt describing the features of
your GUI and how to invoke/use them.
You must also submit these files electronically using the
submit-assignment command.
Note that each script file must have the following comment
block at the top, where the X's are replaced with the appropriate
information, followed by a docstring briefly describing the program in that
script. For instance, my script for this assignment would
begin with the following comment block:
#########################################################
## CS 2500 (Fall 2008), Assignment #8 ##
## Script File Name: addmachGUI.py ##
## Student Name: Todd Wareham ##
## Login Name: harold ##
## MUN #: 8008765 ##
#########################################################
You do not have to develop your code on our CS departmental systems.
However, as your code will be compiled and tested on our CS departmental
systems as part of the assignment marking process,
you should ensure that your code compiles and runs correctly on at
least one of these systems.
- Nov 14, 1:35pm
Assignment #8 posted.
Created: November 14, 2008
Last Modified: December 1, 2008