added designpattern

craete iterator and singleton
added adapter pattern
added template method pattern
added state pattern
added observer pattern
added mediator pattern