Object Oriented Software Engineering   View all facts   Glossary   Help
subject > programming language construct > class > subclass
Next classsuperclass    Upclass    Previous classsingleton^2   

subclass comparison table
Subject need in lack have be is a kind of store is a subtopic of implement group hide create have form perform place in has part divide up into use help order inherit name after represent extend declare draw as contain have high cohesion see also create using
Java subclassa domain model if you have to store or manipulate instances of it in order to implement a requirementside 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 methodssubclassin a file of the same nameThe Basics of Javaparticular low-level subsystemsthe pieces of data that describe some entity, so that programmers can manipulate that data as a unitthe details of datato hold a responsibility if the responsibility cannot be attributed to any of the existing classes
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 filevariablesmethodsan implements clause to declare that it contains methods for each of the operations specified by the interfacea programmer to cope with the complexity of dataelements 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 classesthe internals of a computer system such as 'Record', 'Table', 'Data', 'Structure', or 'Information'several similar objectsonly one superclassa list of variables, called instance variables, corresponding to data that will be present in each instancea box with the name of the class inside in a UML class diagramdata associated with each objectif related aspects of a system are kept together in this module, and unrelated aspects are kept outclass^2the extends keyword

Next classsuperclass    Upclass    Previous classsingleton^2