The conversation between human and AI assistant.
[|Human|] Update the following code so it follows object-oriented principles.
[|AI|] ```swift
class A {
    private var name: String
    
    init(name: String) {
        self.name = name
    }
    
    func printName() {
        print(name)
    } 
}
```
[|Human|] 
Update the following code so it follows object-oriented principles.