JGAP

examples.supergene
Class Force

java.lang.Object
  extended by examples.supergene.Force

public final class Force
extends java.lang.Object

Solve the change problem using force method. This class was used to verify if the solution exists in general.


Field Summary
static boolean REPORT_ENABLED
           
 
Method Summary
static void main(java.lang.String[] args)
          Test the Force method itself.
static boolean solve(int a_sum)
          Check the existence of a soulution.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

REPORT_ENABLED

public static boolean REPORT_ENABLED
Method Detail

solve

public static boolean solve(int a_sum)
Check the existence of a soulution.

Parameters:
a_sum - the sum needed
Returns:
true if the change can be expressed in coins, satisfying pennies mod 2 = nickels mod 2

main

public static void main(java.lang.String[] args)
Test the Force method itself.

Parameters:
args - ignored

JGAP