MONT 105S, Spring 2009

Home | | Course Schedule | | Assignments | | Lecture Notes

MONT 105S Homework 17

Graphical User Interface

Due Friday, April 17, at the beginning of class.

Introduction
In this assignment, you will work with create a graphical user interface (or GUI). You will write a program to create a GUI that looks like the following (on a Mac):

When the user enters their responses and clicks on the "Submit" button, the GUI prints a message in the text box, summarizing the user's responses as follows:

Program Description
Name your program file <username>_questionnaire.py. Your program should have code to include all the GUI elements shown in the above images, with the following properties:

The update_message( ) function
Write the definition of the update_message( ) function at the beginning of your program file, immediately after the line that imports the Tkinter library. The update_message( ) function creates a message with the following statements, each on a separate line:

You should look at your completed lab 9 for examples of how to write this function.

Extra Credit opportunity (up to 5 points extra)
Create a GUI with your own questionnaire. The layout of the GUI must be different from the one in this assignment, but should have a similar or level of complexity. You will get more credit if your questionnaire is nicely laid out.

For full credit, you must have a button that carries out a command when clicked, and responds appropriately to the user's selections in your questionnaire.

For full credit you should make use of each type of GUI element we have learned about in class.

Name the file with your extra credit program: <username>_extraCredit.py.

To Submit Your Finished Project:
1. Hand in a hard copy of the file: <username>_questionnaire.py. If you have an extra credit program, also hand in a hard copy of <username>_extraCredit.py. Hand these to your instructor in class on the project's due date.

2. Print your name at the top of the cover page and staple it to the top of your hard copy.

3. In addition to the hard copy listed above, email your <username>_questionnaire.py and, if you have it, your <username>_extraCredit.py files to me at croyden@mathcs.holycross.edu

Get started early and have fun!