Java   View all facts   Glossary   Help
principle
Next kbTopprocess    UpkbTop    Previous kbToppractice   

principle comparison table
Subject state is a subtopic of found at
code layout principle ProgrammingSun
explicit-representation principlethat 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 categoryProgramming 
is-a versus has-a principlethat 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 classInheritance 
look-it-up principlethat a program should look up a frequently needed answer, rather than computing that answer, whenever practicableProgramming 
modularity principlethat you should divide your programs into units that you can develop and maintain independentlyProgramming 
need-to-know principlethat 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 themProgramming 
no-duplication principlethat 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 differentProgramming 
rule   

Next kbTopprocess    UpkbTop    Previous kbToppractice