Assume you were asking as in C#, not C. Because C is not an OO language, thus if there is encapsulation, it would be different.
The encapsulation in any OO language is to hide the information of data and the implementation detail of a method.
For example, you have a bank account as a private data member. Any one can ask you about the Balance of your bank account, e.g. GetDeposits(), an operation that is public. Wait, you now are richer, and you open 2 more bank accounts, the public still has the only accessing method GetDeposits(), to get your total deposits.
The encapsulation in this abstraction are:
1. The detail, the implementation of GetDeposits(), is not revealed to public.
2. The data member, 1 account or 3 accounts, no one got impact, and no one knows. (in fact, no one knows how many bank accounts you have!)
abstraction and encapsulation is one of the concepts of OOPs and C is not an OOP [Object Oriented Programming language] obviously abst & encap will not be supported by 'C' Abstraction & encapsulation is a concept of OOP [Object Oriented Programming] But, 'C' is not an OOP whereas it is a POP [Procedure oriented programming], so obviously 'C' does not support abstraction and encapsulation Answer Encapsulation is not inherently supported but it can be emulated in C. The use of static and extern keywords for functions are almost equivalent to your private and public keywords in java (encapsulation). Read up more on those keywords.. Structures become an object's attributes while functions accepting pointers the the said struct become its methods.
Which is the most common encapsulation in use on BRI Interface ? A. SDLC B. ATN C. HDLC D. PPP
Encapsulation.
I think the question should be modified as "What is the encapsulation in Object-Oriented programming?" instead of in C#. C# itself is not encapsulated. It supports OO programming, and encapsulation is one of the main characteristics of OO programming". The encapsulation in plain English is to hide a piece of information (data) or behavior (the code) within the object itself. Outside of the object should not and cannot know about it. For instance, let's say you want to add 1 to a property of an object: Person me = new Person(); me.Wallet.Content += 1; The above shows the traditional way of adding 1 to the content of my wallet. But if you examine the code carefully, it was like: "give me all the contents in your wallet, I'll add 1 to those, then put the new contents back in". There is no encapsulation in that code segment. Person me = new Person(); me.AddToWalletContent(1); The above code segment shows a way of encapsulation. Noted that there is no property of Wallet, no property of Content of a Wallet directly being seen here. That's the encapsulation in a nut shell. How the object me (an instance of Person) implements AddToWalletContent(int aNumber) is not the concern of the consumer, and the consumer has no knowledge (does not know, and should not know) about the person has a wallet or not, and if he does, what the contents were before adding 1 to them. I hope the above examples shed some lights about encapsulation in OO.
abstraction, inheritance, encapsulation, and polymorphism.
abstraction and encapsulation is one of the concepts of OOPs and C is not an OOP [Object Oriented Programming language] obviously abst & encap will not be supported by 'C' Abstraction & encapsulation is a concept of OOP [Object Oriented Programming] But, 'C' is not an OOP whereas it is a POP [Procedure oriented programming], so obviously 'C' does not support abstraction and encapsulation Answer Encapsulation is not inherently supported but it can be emulated in C. The use of static and extern keywords for functions are almost equivalent to your private and public keywords in java (encapsulation). Read up more on those keywords.. Structures become an object's attributes while functions accepting pointers the the said struct become its methods.
Which is the most common encapsulation in use on BRI Interface ? A. SDLC B. ATN C. HDLC D. PPP
Encapsulation. Actually, this is one type of encapsulation; encapsulation occurs at several layers.Encapsulation. Actually, this is one type of encapsulation; encapsulation occurs at several layers.Encapsulation. Actually, this is one type of encapsulation; encapsulation occurs at several layers.Encapsulation. Actually, this is one type of encapsulation; encapsulation occurs at several layers.
Kirk C. Benson has written: 'Modeling data encapsulation and a communication network for the National Training Center, Fort Irwin, CA' -- subject(s): SCENARIOS, ENCAPSULATION, ARMY TRAINING, COMMUNICATIONS NETWORKS, MODEL THEORY
Encapsulation.
The concepts of OOP in C++ are the same as for OOP in any other programming language: abstraction, encapsulation, inheritance and polymorphism.
encapsulation hdlc
I think the question should be modified as "What is the encapsulation in Object-Oriented programming?" instead of in C#. C# itself is not encapsulated. It supports OO programming, and encapsulation is one of the main characteristics of OO programming". The encapsulation in plain English is to hide a piece of information (data) or behavior (the code) within the object itself. Outside of the object should not and cannot know about it. For instance, let's say you want to add 1 to a property of an object: Person me = new Person(); me.Wallet.Content += 1; The above shows the traditional way of adding 1 to the content of my wallet. But if you examine the code carefully, it was like: "give me all the contents in your wallet, I'll add 1 to those, then put the new contents back in". There is no encapsulation in that code segment. Person me = new Person(); me.AddToWalletContent(1); The above code segment shows a way of encapsulation. Noted that there is no property of Wallet, no property of Content of a Wallet directly being seen here. That's the encapsulation in a nut shell. How the object me (an instance of Person) implements AddToWalletContent(int aNumber) is not the concern of the consumer, and the consumer has no knowledge (does not know, and should not know) about the person has a wallet or not, and if he does, what the contents were before adding 1 to them. I hope the above examples shed some lights about encapsulation in OO.
abstraction, inheritance, encapsulation, and polymorphism.
Encapsulation is not needed in Java, or any other language. But it's useful. Encapsulation is used to minimise the number of potential dependencies with the highest probability of change propagation.
Encapsulation is one of the four pillars of object-oriented programming. The other three are inheritance, polymorphism and abstraction.
The main features of OOP are the same regardless of the language. They are: encapsulation; data hiding; inheritance; and polymorphism.