Linked Questions

3734 votes
33 answers
2.7m views

In Java, are there clear rules on when to use each of access modifiers, namely the default (package private), public, protected and private, while making class and interface and dealing with ...
intrepion's user avatar
  • 39k
1280 votes
37 answers
631k views

I have heard that the Liskov Substitution Principle (LSP) is a fundamental principle of object oriented design. What is it and what are some examples of its use?
NotMyself's user avatar
  • 30.2k
735 votes
24 answers
439k views

According to the paper written by Martin Fowler, inversion of control is the principle where the control flow of a program is inverted: instead of the programmer controlling the flow of a program, the ...
Amumu's user avatar
  • 18.8k
595 votes
22 answers
510k views

What is the difference between association, aggregation, and composition? Please explain in terms of implementation.
user avatar
233 votes
17 answers
100k views

What is the dependency inversion principle and why is it important?
Phillip Wells's user avatar
40 votes
8 answers
16k views

From Apple's own website: "At the heart of Swift's design are two incredibly powerful ideas: protocol-oriented programming and first class value semantics." Can someone please elaborate what exactly ...
mfaani's user avatar
  • 37.1k
19 votes
6 answers
21k views

I read the Apple's reference about access modifiers in Swift 3. I read also about the same on stackoverflow but I didn't get an answer as the person who asked. As I understood correctly, there are ...
devshok's user avatar
  • 836
2 votes
1 answer
2k views

My intent is to reuse the SelectedValueChanged event inherited from the ComboBox Class (which, in turn, inherits it from the ListControl Class) In the code below: SelectedValueChanged is tagged with ...
VA systems engineer's user avatar
1 vote
1 answer
678 views

If i have 2 classes One for data, for example: public class Cords { public double x; public double y; } and one, that using this data: public class Geometry { public Cords() { ...
CrazyWu's user avatar
  • 697
0 votes
1 answer
328 views

I have 1,5k lines od PHP spaghetti code that have dozens of if's generating dozens more queries. All the conditions are simple "==" or "!=" against list of ~20 possibilities. Now I need to add 21st.....
przemo_li's user avatar
  • 4,073