In object-oriented programming, the object consist of both the data and the functions that operate on the data. In object-oriented programming, a data member plays the role of neither A nor B.
Objects are the product of abstract data types that has inside of it both data and function altogether.
A data member often has different classes. They can be private or public.
Object-oriented programming (OOP) is simply known as a computer programming model that put together software design around data, or objects.