Class { #name : 'ContactBook', #superclass : 'Object', #instVars : [ 'contacts' ], #category : 'ContactBook', #package : 'ContactBook' } { #category : 'demos' } ContactBook class >> createDefault [ ^ self new addContact: (Contact newNamed: 'Damien Cassou' email: 'damien@cassou.me'); addContact: (Contact newNamed: 'Marcus Denker' email: 'marcus.denker@inria.fr'); addContact: (Contact newNamed: 'Tudor Girba' email: 'tudor@tudorgirba.com'); addContact: (Contact newNamed: 'Clara Allende' email: 'clari.allende@gmail.com'); yourself ] { #category : 'writing' } ContactBook >> addContact: aContact [ self contacts add: aContact ] { #category : 'reading' } ContactBook >> contacts [ ^ contacts ] { #category : 'initialization' } ContactBook >> initialize [ super initialize. contacts := OrderedCollection new ] { #category : 'deleting' } ContactBook >> removeContact: aContact [ self contacts remove: aContact ] { #category : 'initialization' } ContactBook >> size [ ^ contacts size ]