Encapsulation, a vital principle in object-oriented programming, refers to the combining of data and the functions that act on that information within a single class. This technique enables data protection by restricting unauthorized access to the sensitive state, allowing controlled interaction