pset10 - MIT OpenCourseWare http:/ocw.mit.edu 6.00...

Info iconThis preview shows pages 1–4. Sign up to view the full content.

View Full Document Right Arrow Icon
MIT OpenCourseWare http://ocw.mit.edu 6.00 Introduction to Computer Science and Programming Fall 2008 For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms .
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
6.00: Introduction to Computer Science and Programming Problem Set 10: OOP I did it again Handed out : Thursday, November 6, 2008 Due : Thursday, November 13, 2008 Introduction We hope you enjoyed the word game from problem sets 5 & 6… because it’s back! In this problem set, you will fill in code for a graphical version of the 6.00 word game, with support for single player, two player, and vs. computer game modes. Along the way, you will implement classes to encapsulate and manage the data and functions for the word game. You will also practice manipulating instances of these classes through methods. Finally, you will see your classes in action as they interact with a graphical user interface (GUI) module for the 6.00 word game. Workload Please let us know how long you spend on each problem. We want to be careful not to overload you by giving out problems that take longer than we anticipated. Collaboration You may work with other students. However, each student should write up and hand in his or her assignment separately. Be sure to indicate with whom you have worked. For further details, please review the collaboration policy as stated in the syllabus. Getting Started Download and save these files into the same folder. ps10.py: The code template for the word game ps10_test.py: A skeleton test harness for the classes in ps10.py. You should add tests to this file. ps10_gui.py: The code for the word game graphical user interface. You should not need to modify this file. words.txt: The list of words from Problem sets 5 and 6 Problem 1: Install wxPython Before you begin the problem set, you will need a toolkit for making a graphical user interface (GUI) in python. We will use the wxPython toolkit for this purpose. First make sure you have Python 2.5.2. You can check what version of Python you have by going to the “Help” menu and clicking “About IDLE” from the Python Shell window in IDLE. With Python 2.5.2 installed, you can download and install wxPython. Download information for wxPython can be found here . Follow the instructions given in the installer. After the installation, start up IDLE and enter “import wx” at the prompt. If no error message appears, you have successfully installed the wxPython toolkit. Install the wxPython toolkit. You do not have to submit anything for this problem.
Background image of page 2
Problem 2: Representing a Hand In problem set 5, you managed a number of data structures and functions pertaining to a player’s hand. The data for the hand was stored as a dictionary that mapped characters to their corresponding frequencies in the hand. A number of functions were used to manage the hand—
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 4
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 6

pset10 - MIT OpenCourseWare http:/ocw.mit.edu 6.00...

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online