People Inc. interview question

Asked basic OOP principles specifically encapsulation and when would you use