Swift Tutorial - Tutorialspoint

(backadmin) #1

}


class circle {


var area = [radius]()


var cprint: Int {


return area.count


}


subscript(i: Int) - > radius {


get {


return area[i]


}


set {


area[i] = newValue


}


}


func circleprint() {


println("The number of rooms is (cprint)")


}


var rectarea: circumference?


}


class radius {


let radiusname: String


init(radiusname: String) { self.radiusname = radiusname }


}


class circumference {


var circumName: String?


var circumNumber: String?


var circumarea: String?


func buildingIdentifier() - > String? {


if circumName != nil {


return circumName

Free download pdf