[INTERFACES AND INHERITANCE]

Published on Slideshow
Static slideshow
Download PDF version
Download PDF version
Embed video
Share video
Ask about this video

Scene 2 (2m 22s)

[Audio] A main design concept is to forbid access to all resources by default, allowing access only through well-defined entry points , i.e. interfaces. Computer interfaces provide access to the underlying computing system's computer resources (such as memory , CPU, storage, etc.); direct access (i.e., not through well-designed interfaces) to such resources through computer may have significant consequences. Application device interfaces can include constants, data types, procedures types, exception descriptions, and process signatures. Also, public variables are often specified as part of an interface. The device module A interface is intentionally set separately from the module implementation. The above includes the actual code defined in the gui for the procedures and methods, as well as other "internal" variables, procedures, etc. The software module B is required to do so only through the published interface , for example the client to A, which communicates with A. INHERITANCE Inheritance is defined as the derivation of a new class on an existing class, with modification or extentions. A subclass inferits all the variables anf methods from its super classes, including its immediate parent as well as all the ancestors. It avoid duplication and reduce redundancy. In object-oriented programming, inheritance is the process of basing an object or class on another object (prototype-based inheritance) or class (class-based inheritance), with identical implementation retained. Also defined as deriving new classes (sub-classes) from existing ones like super-class or base-class, and then forming them into a class hierarchy. An object generated by inheritance, a "child object," acquires all the properties and behaviors of the "parent object" in most class-based object-oriented languages, with the exception of: constructors, destroyers, overloaded operators and base class friend functions. An inherited class is called a parent class subset, or superclass. The term "inheritance" is used loosely for both class-based and prototype-based programming, but in narrow use the term is reserved for class-based programming (one class inherits from another), with the corresponding prototype-based programming technique being called delegation instead (one object delegates to another one). Inheritance should not be confused with subtyping. In some languages, inheritance and subtyping agree, whereas in others they differ; in general, subtyping establishes an is-a relationship, whereas inheritance merely reuses implementation and establishes a syntactic relationship, not necessarily a semantic relationship (inheritance does not allow for behavioral subtyping). Subtyping is also known as interface inheritance to differentiate these terms, while inheritance as described here is known as implementing inheritance or code inheritance. Still, inheritance is a widely used mechanism for creating subtype relationships..

Scene 3 (5m 43s)

[Audio] DPT 6302 INTEGRATIVE PROGRAMMING & TECHNOLOGIES [INTERFACES AND INHERITANCE] 3 Course Module TYPES OF INHERITANCE There are various inheritance forms, depending on the model and common language. Single Inheritance Where subclasses inherit one superclass attributes. A class takes on the properties of a particular class. Multiple Inheritance Where one class can have more than one superclass and inherit features of all classes of parents. Multiple inheritance was commonly thought to be very difficult to implement effectively. Brad Cox, for instance, in a description of C++ in his Objective C book, stated that it was impossible to add multiple inheritance to C++. Therefore, multiple inheritance appeared more of a challenge. Multilevel Inheritance Where it inherits a subclass from another subclass. It is not unusual for a class to be derived from another derived class as seen in the "Multilevel inheritance" figure Class A serves as a class of base for the derived class B, which in turn serves as a class of base for the derived class C. Class B is known as an intermediate base class, as it provides a connection between A and C for the inheritance. The ABC chain is known as direction of inheritance. Hierarchical Inheritance Where one class with more than one sub-class acts as a superclass (base class). For example, two subclasses B and C can have a parent class, A. The parent class of both B and C is A but B and C are two separate subclasses. Hybrid inheritance Hybrid inheritance happens when two or more of the above inheritance forms are combined. One example is when class A has a subclass B that has two subclasses, C and D. There is a combination of descent at both multilevel and hierarchical roots..

Scene 4 (8m 1s)

[Audio] References and Supplementary Materials Books and Journals 1. ; <2018>; ; 2. ; <2012>; ; ; 3. <Basic Integrative Programming Technologies: Data Integration Technology/Architectures>; <2012>; ; Online Supplementary Reading Materials 1. ; ; <May 2, 2020> 2. ; ; 3. ; ; <May 2, 2020> 4. ; ;.