One of the four pillars of object-oriented programming (OOP), inheritance establishes a "is-a" relationship between objects. For example, a "Cat" object can be treated in code as any other "Animal" object because a "Cat" is-a "Animal".

learn more… | top users | synonyms

5
votes
1answer
128 views

Implementing simple and fast inheritance in JavaScript

I have been using the John Resig JavaScript class implementation in my web apps, but the tests shows it is really slow. I really find it useful for the way of extending objects, and the benefits got ...
6
votes
0answers
92 views

Possible class redundancy and improper enum usage

I am looking for code correctness and design usage as I think I might be over doing it in the class department. There are two things I'm mostly concerned with. The possible redundancy of classes ...
5
votes
0answers
70 views

Multiple inheritance pattern for vehicle information

I wanted an easy way to augment objects, by adding functionality from any other object(s). More importantly, I needed a way to augment the object from multiple sources in a clean one-line solution. ...
3
votes
0answers
55 views

Representing trajectory points using inheritance

Problem Background I need to represent trajectory points and trajectories (encapsulating these points) in the form of a collection of classes. All trajectory points have two essential elements: time ...
3
votes
0answers
39 views

Assigning functions for different location classes

Suppose in a School, you can only study, teach, or walk; in a Mall, you can only purchase, walk, or sell; ...
2
votes
0answers
63 views

MultiLevel JavaScript Inheritance

I'm making an experiment on JS, trying to build a framework for OOP. It's called Universe. The main purpose is to emulate a mini-universe, where classes are "created" with a defined behavior ...
2
votes
0answers
57 views

Namespace handling on nodejs and inheritance managing

It should solve the following issues: Handle namespaces; Be a class factory from Pojos Be a object factory Create a class with inheritance capabilities from a POJO using john resig inheritance ...
2
votes
0answers
96 views

Implement.js JavaScript module pattern

I have been playing with a new JavaScript module pattern to see what I can come up with. I think it's quite powerful and wanted to know if it is something people would find useful? I'm looking for ...
1
vote
0answers
144 views

Testing with multiple input datasets and expectations

I wanted to make 3 test suites where each would run a test class with a specific input. I figured that in order to do this I could: Make an abstract test suite with all the variable parts (...
1
vote
0answers
218 views

Driver-layer from top-level app to hardware

I'm attempting to implement driver-layer from top-level app to hardware. Driver is shared library. Framework: Qt. In the first, I extracted interface functions, which further will be called from ...