protocoldrawable{ var serialNumber : Int {getset} funcdraw() }
classcircle : drawable{ var center : CGPoint = CGPoint(x: 0,y: 0) var radius : CGFloat = 0.0 var serialNumber : Int = 0 funcdraw(){ //draw a circle } }
classpolygon : drawable{ var corners : [CGPoint] = [] var serialNumber : Int = 0 funcdraw(){ //draw a ploygon } }
classdiagram{ var element : [drawable] = [] var serialNumber : Int = 0 funcdraw(){ //draw a diagram } }