






Hotspots: Admin Pages | Turn-in Site |
Current Links: Case Final Project Summer 2007
Fall 2003 M1: Create a help repository
(Individual, Due 09/02)
As new Squeak users, you are perfectly positioned to discover what is hard to figure out how to do in Squeak. The first part of this milestone is to generate a list of things you'd like to know how to do in Squeak (before you even start working with it) and of tasks you actually had trouble figuring out how to do (e.g. execute some sample code, create a new class, find the implementors of a particular method, display an image, stop and debug running code).
The second part of this milestone is to develop a TaskInstructions class to contain the instructions for a particular task and a HelpRepository class to contain the set of instructions that your Guide will draw on.
Questions on Fall 2003 Milestone 1
Goals:
Learn basic smalltalk syntax and design and implement a simple smalltalk program as an individual effort. Use SUnit to perform simple unit tests of code.
Requirements:
1. Record at least 10 tasks that (before using Squeak) you wanted to know how to do or (after using Squeak) that you had trouble figuring out how to do. The tasks should be fairly significant; please do not list tasks like "I had trouble figuring out how to do addition." Note that "I had trouble figuring out how to create a scratchpad where I could do addition" would be a valid, significant task.
2. Your class TaskInstructions must at least implement the following methods:
- taskName: aString and taskName
- Access methods for the name of the task described by the instructions
- taskDescription: aString and taskDescription
- Access methods for the description of what the instructions explain
- steps: aCollectionOfStrings and steps
- Access methods for setting or getting all of the instruction steps
- stepAt: anInteger and stepAt: anInteger put: aString
- Returns the nth step (starting with 1 for the first step) or changes the nth step to match the provided string. Make sure to handle people asking for non-existent steps. If there are n steps, allow people to insert a step at the n+1 position (essentially adding a new step).
- fileOut: aFileName
- Writes the instructions, including the name and description, out to the specified file as strings with one information item (e.g. instruction step) per line. Make sure that the file name is valid.
- fileIn: aFileName
- Reads the instructions, including the name and description, into the instance from the specified file as strings with one information item (e.g. instruction) per line. Make sure to handle the case where the file is non-existent.
3. Your class HelpRepository must at least implement the following methods:
- contents
- Returns the names of the tasks the help repository contains instructions for
- contentsWithDescriptions
- Returns the names and descriptions of the tasks the help repository contains instructions for
- addInstructions: aTaskInstructions
- Incorporate new instructions into the repository
- removeInstructions: aString
- Remove the instructions with the specified task name from the repository
- instructionsFor: aString
- Return the TaskInstructions instance with the specified task name
4. Test the methods using SUnit. You should have SUnit classes TaskInstructionsTest and HelpRepositoryTest that test TaskInstructions and HelpRepository. These should be runnable from within TestRunner and contain tests for each method.
Turn-in
In class, please turn-in your list of "hard to figure out" tasks. Before class time, turn-in your well-documented code (at least two lines of comments for each non-accessor method, in-line comments at significant portions) using the Fall 2003 Turnin Information with the code 'M1'.
Grading:
- 5% "Hard to figure out" task list
- 15% Good Smalltalk style:
- 5% Good reuse of existing code
- 5% Variable names start with lowercase letters
- 5% good comments.
- 80% Correct implementation:
- 20% Correctly use SUnit to run unit tests
- 40% Correctly implement TaskInstructions (4% per method)
- 20% Correctly implement HelpRepository (4% per method)
Links to this Page