All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class taxman.TaxNumber

java.lang.Object
   |
   +----taxman.TaxNumber

public class TaxNumber
extends Object
This little class represents a number. The number has a set of factors associated with it. This object can return those factors and stores a count of the factors


Constructor Index

 o TaxNumber(int)

Method Index

 o getFactorCount()
Returns the number of factors for this TaxNumber.
 o getFactors()
Returns the list of factors of this number.
 o getValue()
Returns the integer value of this TaxNumber.
 o isAFactor(int)
Returns true if the number, n, is a factor of this TaxNumber.
 o isAFactor(TaxNumber)
Returns true if the number, n, is a factor of this TaxNumber.
 o main(String[])
Testing fuinction
 o toString()
Returns a string representation of the TaxNumber

Constructors

 o TaxNumber
 public TaxNumber(int N)

Methods

 o isAFactor
 public final boolean isAFactor(TaxNumber n)
Returns true if the number, n, is a factor of this TaxNumber.

Returns:
true if the number, n, is a factor of this TaxNumber. false otherwise
 o isAFactor
 public final boolean isAFactor(int n)
Returns true if the number, n, is a factor of this TaxNumber.

Returns:
true if the number, n, is a factor of this TaxNumber. false otherwise
 o getFactorCount
 public final int getFactorCount()
Returns the number of factors for this TaxNumber. The number is calculated on creation of the TaxNumber so this just returns the pre-calculated value

Returns:
The number of factors for this TaxNumber.
 o getFactors
 public final int[] getFactors()
Returns the list of factors of this number.

Returns:
Array with factors of this number
 o getValue
 public final int getValue()
Returns the integer value of this TaxNumber.

Returns:
The integer value of this TaxNumber
 o toString
 public String toString()
Returns a string representation of the TaxNumber

Returns:
A string representation of the TaxNumber
Overrides:
toString in class Object
 o main
 public static void main(String args[])
Testing fuinction


All Packages  Class Hierarchy  This Package  Previous  Next  Index