package { import com.actionscriptbible.Example; import flash.utils.Dictionary; public class ch10ex2 extends Example { public function ch10ex2() { var guy1:Person = new Person("Bob"); var guy2:Person = new Person("Charlie"); var girl1:Person = new Person("Alice"); var girl2:Person = new Person("Alice"); var notes:Dictionary = new Dictionary(); notes[guy1] = "Likes games"; notes[guy2] = "Super organized"; notes[girl1] = "Enjoys drawing"; notes[girl2] = "Plays piano"; trace(girl1, notes[girl1]); trace(girl2, notes[girl2]); } } } class Person { public var name:String; public function Person(name:String) { this.name = name; } public function toString():String { return name; } } Chapter 10 Example 2