First Day Activities
Spark your students’ interest in the idea of algorithm development with these activities.
Introduction to Algorithm Development
Contributed by Geralyn DeGeorge Kovach
Seton Hall Preparatory School
West Orange, New Jersey
You can use this project when teaching algorithms and program design.
Materials needed (modify to fit your area):
- 4 maps (for Northern New Jersey: 2 South Essex, 2 North Essex) to be used in Part I
- 2 sets of instructions for South and North scenarios (Part I)
- 4 blank sheets for written street directions (Part I)
- 4 blank maps: 2 South Essex, 2 North Essex (Part II)
- 4 street indexes
- 4 highlighters
- Question sheets
Objective: To compare and contrast mapped directions (pictorial) to sequential street directions in order to compare and contrasts the benefits of writing algorithms and flowcharts for program design.
Procedures
Part I
-
Divide students into four groups, labeling the groups 1 through 4.
-
Give groups 1 and 2 the instructions for Part I South Essex.
Part I South Essex: Students from Seton Hall University planned to visit Bell Labs in New Providence. After their tour, the group went to Clark Memorial Park in Westfield for a picnic. Unfortunately, several students got food poisoning and the whole troop drove over to Union Hospital (on Galloping Hill Road), where they spent the rest of the evening.
Directions: Using the highlighter provided, outline the route taken from the start of the day to the evening. Next, write down the step-by-step road directions, noting all streets, directions, and mileage. Your steps should be precise enough for someone to be able to draw a map. Hand in all materials when you are finished.
-
Give groups 3 and 4 the instructions for Part I North Essex.
Part I North Essex: Students from Montclair State University planned to go to Grover Cleveland Memorial Park in Caldwell for a picnic. Afterward they played nine holes of golf at the Francis A. Byrne course off of Route 10 in West Orange. Unfortunately, several students suffered injuries from flying golf balls, so the whole troop drove over to Montclair Community Hospital (on Harrison Avenue) where they spent the rest of the evening.
Directions: Using the highlighter provided, outline the route taken from the start of the day to the evening. Next, write down the step-by-step road directions, noting all streets, directions, and mileage. Your steps should be precise enough for someone to be able to draw a map. Hand in all materials when you are finished.
-
Each group should also receive a sheet for writing down the written street directions.
-
Street Direction Template (.pdf/54KB)
-
-
When a group is finished, everyone is to sign his/her name to the written direction sheet and submit it along with the map.
Part II
Give the South Essex groups 1 and 2 the directions from a North Essex group (either group 3 or 4) with a blank North Essex map. Give the North Essex groups 3 and 4 the directions from a South Essex group (either group 1 or 2) with a blank South Essex map.
Directions: Using the blank map provided, follow the instructions on the direction sheet that you received and highlight the route described to travel from the starting point indicated to the final destination. Sign your names on the map.
Part III
Each student now receives a question sheet to complete.
Questions:
Which part did you find the easiest?
Would you rather receive literal directions (street listings) or a map?
What is an algorithm?
How was this activity similar to following an algorithm?
What characteristics of a good algorithm did your directions have?
What characteristics of a good algorithm did your directions not have that may have helped?
Objects First
Contributed by Alyce Brady
Kalamazoo College
Kalamazoo, Michigan
On the first day of class I focus on objects. I describe an object-oriented program as a collection of "objects" that work together to perform a task. I then define an object-oriented "object" as being a combination of "state" and "operations" and provide some ways of thinking about what constitute state and operations.
Object = State + Operations
As I go through these, I tend to use a box (cardboard? wooden? open? closed?) and an elevator as my examples. Then I draw an object diagram for a box, showing some specific state information (cardboard, brown, 12" x 14" x 8", open, etc.) and a set of reasonable operations (open, close, add item, remove item, etc.).
Next I give students some blank object diagrams (I now have these on my website), and ask them to think of some objects in the real world and create diagrams showing their state and operations. We always get some obvious choices and some non-obvious ones too. The first time I did this, the three examples that students put on the board happened to be a cat, a car, and a carrot. This lead to an interesting discussion of how some operations were ones that other objects do to an object (e.g., the eating operation on a carrot), whereas others were ones that the object does for itself (e.g., the eat, sleep, and chase tail operations on a cat).
State | Operations |
---|---|
Information about the object |
Tasks involving this object |
Parts it is composed of |
What you can do to this object (e.g., open it, close it, move it) |
Attributes that make this object different from others like it (e.g., color, material, size) |
What you can ask this object to do: Tell me your color. Tell me your size. Move yourself. Open up. Add this item to your list of contents. |
State of this object between operations (e.g., open/closed, running/still) |
Special operations to construct objects (constructors) |
List of other objects with which this object interacts and communicates (e.g., list of contents) |