Answer Posted / rahul
Encapsulation can be described as a protective barrier
that prevents the code and data being randomly accessed by
other code defined outside the class.
Encapsulation is the technique of making the fields in a
class private and providing access to the fields via public
methods. If a field is declared private, it cannot be
accessed by anyone outside the class, thereby hiding the
fields within the class. For this reason, encapsulation is
also referred to as data hiding.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Why do we use inheritance?
Question: Implement a base class Appointment and derived classes Onetime, Daily, Weekly, and Monthly. An appointment has a description (for example, “see the dentist”) and a date and time. Write a virtual function occurs_on(int year, int month, int day) that checks whether the appointment occurs on that date. For example, for a monthly appointment, you must check whether the day of the month matches. Then fill a vector of Appointment* with a mixture of appointments. Have the user enter a date and print out all appointments that happen on that date.
What is abstraction example?
What is the oops and benefits of oops programming?
How do you explain polymorphism?
What is the real life example of polymorphism?
Why is it so that we can have virtual constructors but we cannot have virtual destructors?
What is property in oops?
I have One image (means a group photo ) how to split the faces only from the image?............ please send the answer nagadurgaraju@gmail.com thanks in advace...
What does no cap mean?
Why do we use oop?
What is object in oop with example?
Can a varargs method be overloaded?
How do you use inheritance in unity?
Hi friends I have experience of 6 months in website design and maintanence. Now i am looking for other IT jobs.. to switch platform. please post any interview you know in chennai.