role of object in connection with data members and methods of a class
Answers
Answered by
3
Answer:
Accessing data members and member functions: The data members and member functions of class can be accessed using the dot('. ') operator with the object. For example if the name of object is obj and you want to access the member function with the name printName() then you will have to write obj. printName() .
Answered by
1
Answer:
One of the most important capabilities that a method provides is method overriding - the same name (e.g., area ) can be used for multiple different kinds of classes. ... Methods also provide the interface that other classes use to access and modify the properties of an object; this is known as encapsulation.
Explanation:
Hope its helpful.
Similar questions
English,
1 month ago
Math,
1 month ago
English,
1 month ago
English,
2 months ago
Social Sciences,
2 months ago
Computer Science,
10 months ago
Geography,
10 months ago
Hindi,
10 months ago