swift2.2 NO.5

////

protocol ExampleProtocol{

    var simpleDescription :String{get}

    mutating func adjust()

}

 

class SimpleClass:ExampleProtocol{

    

    var simpleDescription:String = "A very simple class."

    var anotherProperty:Int = 70106

    func adjust() {

     simpleDescription += "Now 100% adjusted"

    }

}

 

posted @ 2016-03-05 00:03  yshgxm  阅读(93)  评论(0编辑  收藏  举报