Explain encapsulation and data hiding, C/C++ Programming

Assignment Help:

Encapsulation and Data Hiding

The property of being a self-contained unit is known as encapsulation. The idea that the encapsulated unit can be used without knowing how it works is known as data hiding.

Encapsulation is the principle by which related contents of a system are being together. It minimizes traffic among different parts of the work and it divides certain specific requirements from other parts of specification, which use those requirements.

The significant advantage of using encapsulation is that it helps minimize rework when developing a new system. The part of the work, which is prone to change, can be encapsulated together. Thus any changes can be made without affecting the overall system and as changes can be easily incorporated.

As noted before, when an engineer requires adding resistor to the device she is creating, she doesn't typically build a new one from the scratch. She walks over to a bin of resistors, examines the bin of resistors, examines the colored bands that show the properties, and picks the one she requires. The resistor is a "black box" as far as the engineer is concerned - that is, she doesn't care how it does its work as long as it conforms to her specifications.

 


Related Discussions:- Explain encapsulation and data hiding

Evaluate the credit worthiness of a client, Write a C++ program that can be...

Write a C++ program that can be used to evaluate the credit worthiness of a client. The program reads the credit limit and the price and quantity of the item to be purchased by the

Board coloring, in this problem you are given a board in which some of the ...

in this problem you are given a board in which some of the elements are placed as shown in below diagram.each element represent a color.fill the other element in the board,such tha

Beti, how is a beti a beti

how is a beti a beti

Explain automatic variables, Automatic Variables Automatic variables ar...

Automatic Variables Automatic variables are variable which are explained within the functions. They lose their value when the function terminates. It can be accessed only in th

Luminous Jewels - The Polishing Game, Byteland county is very famous for lu...

Byteland county is very famous for luminous jewels. Luminous jewels are used in making beautiful necklaces. A necklace consists of various luminous jewels of particular colour. Nec

Described friend?, A: Something to let your class to grant access to anothe...

A: Something to let your class to grant access to another class or function. Friends may be either classes or functions. Class grants access privileges to its friends. In genera

Luminous Jewels - The Polishing Game, 1. Jewels can only be removed for pol...

1. Jewels can only be removed for polishing from either end of the necklace (i.e. head or tail) 2. Once a jewel type is removed from the necklace, all other instances of the same j

Area under curve, Write a program to find the area under the curve y = f(x)...

Write a program to find the area under the curve y = f(x) between x = a and x = b, integrate y = f(x) between the limits of a and b.

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd