PDF Google Drive Downloader v1.1


Report a problem

Content text CSU4301 session 3_watermark.pdf




26 only those information which are required to understand the Object. So Abstraction means putting all the variables and methods in a Class which are necessary. Encapsulation is a process which combines code and data it manipulates in to a single unit. It provides a layer of security around manipulated data, protecting it from unwanted access or alteration. In other words it is a process of hiding all the internal details of an Object from the outside real world. The word Encapsulation, is like enclosing into the capsule. It restrict client from seeing its internal view where behavior of the abstraction is implemented. In Encapsulation, generally to hide data making it private and expose public property to access those data from outer world. Encapsulation is a method for protecting data from other methods. Encapsulation and Abstraction is very close concepts in OOP and Encapsulation is the mechanism by which Abstraction is implemented. 3.4 Inheritance Inheritance is the most powerful feature in OOP. Inheritance is a concept of one Class of Objects inheriting the data and behavior from another Class of Objects. This is basically done by creating new Class, reusing the properties of existing Class. The mechanism of deriving the new Class from existing Class is called inheritance. The old Class is called as super Class or parent Class and the new one is called as sub Class or child Class. The new derived Class inherits the attributes and methods of the base Class and also adds its own. This is also called as ― is-a‖ relationship. Figure 3.2 : Graphical representation of Inheritance According the Figure 3.2 Class A is the super Class and the Class B is the sub Class. Class B inherits all the attributes and the methods in the Class A as well as some additional properties. Inheritance also helps you to reuse existing code from one or more Classes by simply deriving a new Class from them. It supports the reusability. (Session 9 explains the inheritance in detail) A B

Related document

x
Report download errors
Report content



Download file quality is faulty:
Full name:
Email:
Comment
If you encounter an error, problem, .. or have any questions during the download process, please leave a comment below. Thank you.