Java View all facts Glossary Help |
principle |
principle comparison table |
Subject | state | is a subtopic of | found at |
---|---|---|---|
code layout principle | Programming | Sun | |
explicit-representation principle | that whenever there is a natural category with which your program needs to work, there should be a class in your program that corresponds to that category | Programming | |
is-a versus has-a principle | that if you find yourself using the phrase "an X is a Y" when describing the relation between two classes, then the first class is a subclass of the second; if you find yourself using "X has a Y", then instance of the second class appear as parts of instances of the first class | Inheritance | |
look-it-up principle | that a program should look up a frequently needed answer, rather than computing that answer, whenever practicable | Programming | |
modularity principle | that you should divide your programs into units that you can develop and maintain independently | Programming | |
need-to-know principle | that you should restrict access to your classes to the instance variables and methods in public interfaces so that you can revise and improve the other instance variables and methods without worrying about whether other programmers have already come to depend on them | Programming | |
no-duplication principle | that instance variables and instance methods should be distributed among class definitions to ensure that there is no needless duplication, otherwise duplicate copies are bound to become gratuitously different | Programming | |
rule |