Quick actions

cmd+k|ctrl+k

Navigation

Languages

Function

Snippet info

Language

Swift

Visibility

public

Author

alfian

Created

2020-06-02T13:32:01Z

Updated

2020-06-02T13:32:01Z

class Kucing {
    var _color: String
    var _height: Double
    var _length: Double
    var _weight: Double
    
    init(color: String, height: Double, length: Double, weight: Double){
        _color = color
        _height = height
        _length = length
        _weight = weight
    }
    
    func purring() {
        print("Meow ..")
    }
    
    func eat() {
        _weight = _weight + 1
    }
}
INFO