Object Oriented Software Engineering   View all facts   Glossary   Help
subject > component > module > Java module > Java class > Java subclass
Next Java classJava wrapper class    UpJava class, subclass    Previous Java classJava public class   

Java subclass comparison table
Subject lack have be is a synonym of store is a kind of is a subtopic of implement have form perform place in has definition use order inherit extend have high cohesion create using
Java classside effects if it does not modify any data, and does not leave behind any information, other than its result, that would have an effect on other computationsa unique name since somebody in the future might want to import the packages containing both classes and hence create a name clashabstract if it has one or more abstract methods in a file of the same nameJava moduleThe Basics of Javaparticular low-level subsystems
class classname
{ // declarations of variables
// declarations of constructors (discussed below)
// declarations of other methods with public ones first
}
a special-purpose function such as the user interface for a particular systemits own source file an implements clause to declare that it contains methods for each of the operations specified by the interfaceelements as follows:
  1. class variables
  2. instance variables
  3. constructors
  4. the most important public methods
  5. methods that are simply used to access variables
  6. private methods
 only one superclassif related aspects of a system are kept together in this module, and unrelated aspects are kept out 
subclass a comment at the top describing the purpose of the class, how it should be used, its authors and its history of modificationthe unit of data abstraction in an object-oriented programderived class class2.5 - Organizing Classes Into Inheritance Hierarchies    A class that is an extension of another class, and hence inherits from the other class  all instance variables and methods defined in its ancestor classes   
Java subclassside effects if it does not modify any data, and does not leave behind any information, other than its result, that would have an effect on other computationsa unique name since somebody in the future might want to import the packages containing both classes and hence create a name clashabstract if it has one or more abstract methods in a file of the same namesubclassThe Basics of Javaparticular low-level subsystems
class classname
{ // declarations of variables
// declarations of constructors (discussed below)
// declarations of other methods with public ones first
}
a special-purpose function such as the user interface for a particular systemits own source file an implements clause to declare that it contains methods for each of the operations specified by the interfaceelements as follows:
  1. class variables
  2. instance variables
  3. constructors
  4. the most important public methods
  5. methods that are simply used to access variables
  6. private methods
all instance variables and methods defined in its ancestor classesonly one superclassif related aspects of a system are kept together in this module, and unrelated aspects are kept outthe extends keyword

Next Java classJava wrapper class    UpJava class, subclass    Previous Java classJava public class