






Hotspots: Admin Pages | Turn-in Site |
Current Links: Case Final Project Summer 2007
Sum2003-M1: Show a Directory as a Slide Show
You are to implement a class SlideShow that has a (class) method create: that takes as an argument a directory specified as a string, e.g., 'C:\Documents and Settings\Barb Ericson\My Documents\My Pictures\hawaii02'.
Instances of SlideShow should understand the message show: which takes an argument of the number of seconds to wait between each slide. When show: is executed, it should:
- Show each .jpg, .bmp, or .gif file in the directory specified, one at a time, on the Display. (You can use whatever ordering returned by FileDirectory's response to fileNames.)
- Wait for the given amount of time between slides.
- Keep going for all image files in the directory.
Hints
- FileDirectory on: 'C:\Documents and Settings\Barb Ericson\My Documents\My Pictures\hawaii02' creates a FileDirectory instance, which understands the message fileNames.
- You can open pictures with Form fromFileNamed: 'myfile.gif' (or .jpg or .bmp). They don't display automatically, you will need to display them.
- You can use the message fullNameFor: fileName on an instance of FileDirectory to get the full path name for the fileName.
- You can wait using Delay (p. 105)
Questions on Summer 2003 M1 Milestone
In class, please turn-in well-documented, hardcopy source code (at least two lines of comments for each non-accessor method, in-line comments at significant portions) with your name and student number on it. In addition, before class time, turn-in your code using the Summer 2003 Turnin Information with the code 'M1'.
Grading:
- 20% Good Smalltalk style:
- 10% Good reuse of existing code
- 5% Variable names start with lowercase letters
- 5% good comments.
- 80% Correct implementation:
- 20% Successful creation of instance
- 20% Successful walking of directory
- 10% Picking out only image files
- 20% Displaying the image files
- 10% Delaying appropriately
Links to this Page
- Summer 2003 Project Milestones last edited on 8 May 2003 at 3:11 pm by user-11fa82t.dsl.mindspring.com
- Cases Page last edited on 25 July 2003 at 7:45 pm by conway-w2k.cc.gatech.edu
- Group No. 9 last edited on 27 July 2003 at 9:58 pm by r57h176.res.gatech.edu