Encapsulation in ObjectOriented Approach
The term "encapsulation" is usually used to point up the advantage of Object Oriented method in computer programming approach. It means that in Object-Oriented approach, an object is encapsulated from any other object there is. Everything inside an object, cannot be "touched" (accessed) by any other object within the program, unless it is permitted to be.
So whenever we want any property of an object (constants, variables, functions, or procedures) to be revealed to others, we just have to set it as a "Public" property (usually done by typing the word "Public" in the beginning of its declaration). And when we don't want it to be, we set it as "Private".
And encapsulation is an advantage because as the programming goes on, we don't have to worry about the same constant, variable, function, or procedure's name within the whole program. Every object has its own properties, and can only be accessed if it was allowed.
Table of Content
- Abstract Classes
- Access Specifiers
- ASP.NET 2.0 Interview Questions
- Assembly and Namespaces
- Authentication in .Net
- Authorization in .Net
- Boxing vs Unboxing
- Const vs Read-only
- Const vs Read-only
- Constants in .Net
- Constructors
- Constructors of Extended Classes
- Cursor point to TextBox
- Data Abstraction
- Data Encapsulation
- Destructors
- Example on Encapsulation
- Fields in .Net
- Focus method
- Function Overloading
- Garbage Collections
- Gridview with Paging
- Indexers in .Net
- Inheritance and Extended Classes
- Inheritance in .Net
- Inheritance n Extended Classes
- Members of a Class
- Methods and Events
- Namespace used in EventLog
- Object
- Overriding and Hiding
- Page Life Cycle
- Properties in .Net
- Ref vs Out parameter
- Server.transfer vs Response.redirect
- Signatures of Main[] fn
- State Management
- String vs String Builder
- Types of parameters
- Using Keyword
- Value type vs Ref type
- Versioning in .Net
- What are Class Methods
- What are Classes
- What are Constructors
- What are Delegates
- What are Objects
- What is View State
- When to OverLoad
Thursday, June 24, 2010
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment