Object Oriented Software Engineering   View all facts   Glossary   Help
subject > component > module > Java module > Java class > Java class in a package
Next Java classJava class that implements an interface    UpJava class    Previous Java classJava abstract class   

Java class in a package comparison table
Subject need in lack have be is a kind of store is a subtopic of implement group hide create have form put into perform place in has part divide up into use help order name after represent extend declare draw as contain have high cohesion refer to by see also
Java class in an imported packagea 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 methodsJava class in a packagein 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 directory with the same name as the packagea 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
the 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 outname if the package is importedclass^2

Next Java classJava class that implements an interface    UpJava class    Previous Java classJava abstract class