|
 |
|
|
| This portfolio explains atozsolution.com
design expertise of our work showcase. Here we are displayed some of our sample designs and recent projects for web designs. Click thumbnail to view larger image |
 |
|
|
|
|
| |
|
|
|
|
|
| |
Class Based Programming |
Class-based programming, or more commonly class-orientation, refers to the style of object-oriented programming in which inheritance is achieved by defining classes of objects, as opposed to the objects themselves (compare Prototype-based programming).
Class-based languages, or, to be more precise, typed languages, where subclassing is the only way of subtyping, have been criticized for mixing up implementations and interfaces—the essential principle in object-oriented programming.
It says one might create a bag class that stores a collection of objects, then extends it to make a new class called a set class where the duplication of objects is eliminated. Now, a function that takes a bag class may expect that adding two objects increases the size of a bag by two, yet if one passes an object of a set class, then adding two objects may or may not increase the size of a bag by two.
The problem arises precisely because subclassing implies subtyping even in the instances where the principle of subtyping, known as the Liskov substitution principle, does not hold. Therefore normally one must distinguish subtyping and subclassing. Most current object-oriented languages distinguish subtyping and subclassing, however some approaches to design do not.
An advantage of inheritance is that modules with sufficiently similar interfaces can share a lot of code, reducing the complexity of the program.
Inheritance therefore has another view, a dual, called polymorphism, which describes many pieces of code being controlled by shared control code.
Inheritance is typically accomplished either by overriding (replacing) one or more methods exposed by ancestor, or by adding new methods to those exposed by an ancestor. |

|
|
|
|
|
|