Double class | is a subtopic of The Basics of Java | ![2001-08-30 14:55:23.0](facet.gif) |
is an instance of Java wrapper class | ![2001-08-30 14:55:23.0](facet.gif) |
see also double | ![link: chapter2section2.8.html#614, 2001-08-30 14:55:23.0](facet.gif) |
Java wrapper class | contains the methods parseInt, toHexString, isDigit | ![2001-08-30 14:56:22.0](facet.gif) |
contains useful class methods | ![2001-08-30 14:56:22.0](facet.gif) |
corresponds to Java primitive data type | ![2001-08-30 14:56:22.0](facet.gif) |
has purpose to allow you to do something with primitive values beyond what the basic operators can accomplish | ![2001-08-30 14:56:22.0](facet.gif) |
Java class | can extend only one superclass | ![2001-08-30 14:56:09.0](facet.gif) |
can have more than one constructor each of which has different sets of arguments | ![2001-08-30 14:56:09.0](facet.gif) |
can have the same name as another class if the two classes are not in the same package and their packages are never imported into the same file | ![2001-08-30 14:56:09.0](facet.gif) |
can implement more than one interface | ![2001-08-30 14:56:09.0](facet.gif) |
has form class classname { // declarations of variables // declarations of constructors (discussed below) // declarations of other methods with public ones first } | ![2001-08-30 14:56:10.0](facet.gif) |
is abstract if it has one or more abstract methods | ![2001-08-30 14:56:10.0](facet.gif) |
is stored in a file of the same name | ![2001-08-30 14:56:10.0](facet.gif) |
may implement particular low-level subsystems | ![2001-08-30 14:56:10.0](facet.gif) |
should be placed in its own source file | ![2001-08-30 14:56:10.0](facet.gif) |
should have a unique name since somebody in the future might want to import the packages containing both classes and hence create a name clash | ![2001-08-30 14:56:10.0](facet.gif) |
should order elements as follows: - class variables
- instance variables
- constructors
- the most important public methods
- methods that are simply used to access variables
- private methods
| ![2001-08-30 14:56:10.0](facet.gif) |
uses an implements clause to declare that it contains methods for each of the operations specified by the interface | ![2001-08-30 14:56:10.0](facet.gif) |
class | declares a list of variables, called instance variables, corresponding to data that will be present in each instance | ![2001-08-30 14:54:50.0](facet.gif) |
has part class name | ![2001-08-30 14:54:50.0](facet.gif) |
has part class variable | ![2001-08-30 14:54:50.0](facet.gif) |
has part code | ![2001-08-30 14:54:50.0](facet.gif) |
has part constructor | ![2001-08-30 14:54:50.0](facet.gif) |
has part instance variable | ![2001-08-30 14:54:50.0](facet.gif) |
has part method | ![2001-08-30 14:54:51.0](facet.gif) |
has part variables | ![2001-08-30 14:54:51.0](facet.gif) |
is divided up into methods | ![2001-08-30 14:54:51.0](facet.gif) |
is drawn as a box with the name of the class inside in a UML class diagram | ![2001-08-30 14:54:51.0](facet.gif) |
is needed in a domain model if you have to store or manipulate instances of it in order to implement a requirement | ![2001-08-30 14:54:51.0](facet.gif) |
represents several similar objects | ![2001-08-30 14:54:51.0](facet.gif) |
should be created to hold a responsibility if the responsibility cannot be attributed to any of the existing classes | ![2001-08-30 14:54:51.0](facet.gif) |
should be named after things their instances represent in the real world | ![2001-08-30 14:54:51.0](facet.gif) |
should not be named after the internals of a computer system such as 'Record', 'Table', 'Data', 'Structure', or 'Information' | ![2001-08-30 14:54:51.0](facet.gif) |
data abstraction | groups the pieces of data that describe some entity, so that programmers can manipulate that data as a unit | ![2001-08-30 14:55:09.0](facet.gif) |
helps a programmer to cope with the complexity of data | ![2001-08-30 14:55:09.0](facet.gif) |
hides the details of data | ![2001-08-30 14:55:09.0](facet.gif) |
module | has high cohesion if related aspects of a system are kept together in this module, and unrelated aspects are kept out | ![2001-08-30 14:56:38.0](facet.gif) |
lacks side 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 computations | ![2001-08-30 14:56:38.0](facet.gif) |
component | may perform a special-purpose function such as the user interface for a particular system | ![2001-08-30 14:55:00.0](facet.gif) |