Understanding the Ways in which Classes are Connected
Inheritance is a very important concept within the object oriented programming paradigm. Inheritance is essentially comprised of the merger of two simple concepts, which are reuse and abstractions.
To begin with, you may recognize that two constructs, such as X and Y, have something which relates them together. If you do not wish to deal with this shared aspect more than once, then you have the option of creating a construct called Z that will be responsible for holding the commonality, taking the commonality from X and Y and restoring it inside X and Y by allowing them to inherit the item from Z.
For example, let us say you are dealing with three fruits, oranges, bananas and apples. These three things have something in common; they are all fruits. It may be useful to introduce the notion called Fruit and factor out the fruit commonality which exists among the three fruits.
In addition to this, it might not be a bad idea to introduce another example. Consider a simple “Account” class which is capable of capturing the commonalities which are associated with business accounts, checking accounts, or savings accounts.
The hierarchical abstraction for these standard features may work with the basic human understanding that is related to the classes or objects which make up a system.
Another thing that you will want to take the time to consider is reuse along with specialization. The second reason for making usage of inheritance can come about during the construction of the model.
For example, when class D model is constructed, you must be able to recognize the features that are associated with class D, which have already been developed for class E. Rather than taking the time to reconstruct features, you will want to create an inheritance link which is direct among class E and class D models.
When you make use of a specialized class, you can reuse all the other features for the other class. Within the world of programming, this may be referred to as the "programming that exists among differences."
Another important factor to pay close attention to is the inheritance of properties. Some of the notions which are associated with inheritance include the design, analysis, and the implementation for properties which are respective, including code and computation. Because classes will not be described based on code for the analysis phase, you must make use of additional abstraction for inheritance which is visible in object oriented programming.
Property Inheritance
Properties are comprised of a number of class features which are declarative, and they also make use of constraints which are associated with them.
Property inheritance should be thought of as the foundation that exists for inheritance within the implementation level, as well as the level for design.
Property inheritance is essentially a relationship that exists among the superclass and the subclass. The Class Q is the subclass for the superclass P, where every attribute, transition network, and constraint for P is also the attribute.
In addition to this, the subclass Q is a lot stronger than other subclasses. Instances for some classes may make use of properties which are definitional, but which may also be constrained by more features which are definitional.
The Attributes
Attributes are also very important when it comes to classes. All the instances of a class would be responsible for possessing a specific attribute, and this means that every instance for other classes. If there is a relationship between two classes, then this means that there may be a relationship between other classes as well.
Should the relationship be functional, and every bit of P is within the domain for the relationship, then this means that for each instance there should be an associated instance. Every class may be considered to be little more than a subclass for a standard base.
You may feel that same classes are used to describe different objects. This means that it will be connected to the root for the inheritance hierarchy. The class does not define any attributes, and it will also not define any transitions.