2 examples of encapsulation
CyberAkay:
I tried to answer your question, if it was useful kindly mark the answer as brainliest
Answers
Answered by
0
Dear mate,
Kindly mark the answer as brainliest if you find it useful.
Here's what you were looking for:
Encapsulation examples in real life:
1. Car
You only see the parts that are outside. But other main unit such as engine, compressor and exhaust are hidden from the user.
2. Fan
You just turn the regulator and the fan speed changes. Whatever happens inside you don't know that.
In C++ classes implement encapsulation as only the public members are visible and accessible, not the private and protected one.
Hope this clears your doubt.✌
Kindly mark the answer as brainliest if you find it useful.
Here's what you were looking for:
Encapsulation examples in real life:
1. Car
You only see the parts that are outside. But other main unit such as engine, compressor and exhaust are hidden from the user.
2. Fan
You just turn the regulator and the fan speed changes. Whatever happens inside you don't know that.
In C++ classes implement encapsulation as only the public members are visible and accessible, not the private and protected one.
Hope this clears your doubt.✌
Answered by
0
OOPs concepts and polymorphism
Similar questions