Skip to main content

Questions tagged [subclassing]

0 votes
2 answers
301 views

Example: The MacOS API known as Cocoa uses Delegation to specify various behaviors within the app. A Delegate is a separate object that implements a set of methods that are called by an original ...
CPlus's user avatar
  • 1,219
-1 votes
1 answer
1k views

Say I have two object types of the same interface MyObj (I am using python in this project so I will use the same for the explanation) class Foo(MyObj): a = [5, 10] class Bar(MyObj): a = [[1, ...
doca's user avatar
  • 255
6 votes
4 answers
4k views

I am writing numerical calculation software using .NET C#, which needs to be blazingly fast. There is a lot of fractional math. So using decimal type is pretty much out of the question, given its poor ...
Brie's user avatar
  • 288
2 votes
2 answers
814 views

I'm trying to engineer this: 200 subclasses [ Derived Classes ] After a subclass is defined, I wont need to edit any other file. [ Decoupled ] Subclass Definition registers itself. [ Definition is ...
Anon's user avatar
  • 3,649
1 vote
2 answers
124 views

I've been building an application that processes documents through different filters. I have a class (or better as an interface for creating test-doubles?) called Document. The Document class ...
Michael Stadler's user avatar
0 votes
2 answers
717 views

I have a group of classes (let's say B,C,D,E) that basically represent specific operations a user can execute. I would like to have a single point of access for creating these object and launch their ...
Akinn's user avatar
  • 109
1 vote
3 answers
1k views

I'm trying to document some of my JavaScript according to this JavaScript Documentation guide and came across member access (private, public, protected). I was wondering what the classification would ...
KGlasier's user avatar
  • 219
0 votes
1 answer
93 views

So i have a class called VirtualMouse, it is used to perform mouse actions such as moving and clicking. public class VirtualMouse { public VirtualMouse() { } public void ...
Joao Vitor's user avatar
2 votes
2 answers
145 views

I have a database that stores client data. All data is in one table. For each client, there is one row per day. Clients have different kinds of contracts, their data format remains the same, however, ...
zuiqo's user avatar
  • 927
54 votes
3 answers
19k views

The highest rated answer to this question about the Liskov Substitution Principle takes pains to distinguish between the terms subtype and subclass. It also makes the point that some languages ...
tel's user avatar
  • 569
0 votes
3 answers
2k views

Regarding enums in java how I understood is Sample enum public enum Strategy { STRATEGY_A { @Override void execute(){ System.out.print("Executing strategy A"); ...
Tom Taylor's user avatar
0 votes
1 answer
83 views

I'm writing a trading framework in MQL and I'm confused how I should organise my class hierarchy. |-- Terminal (Log) | |-- Market | | |-- Chart | | | |-- Draw | |-- Account | | | |...
kenorb's user avatar
  • 137
7 votes
4 answers
429 views

Observation There are many Exception subtypes that don't have any added state or behavior. For example, ClosedByInterruptException code. Question Why is subtyping without adding state or behavior "...
Dioxin's user avatar
  • 953
2 votes
2 answers
693 views

I am new to design patterns, here is a classic example of basic mediator pattern that has 3 problems with it, first of all take a look at the application image, diagram, code and description: We use a ...
vaheeds's user avatar
  • 73
4 votes
2 answers
555 views

This is not an easy one but here goes. I'm working on adapting a JavaScript project (ACE Editor) to support two different targets but maybe more. Any way I look at it, it looks like a large task and ...
1.21 gigawatts's user avatar

15 30 50 per page