JGAP

examples.audit
Class CoinsExample

java.lang.Object
  extended by examples.audit.CoinsExample

public class CoinsExample
extends java.lang.Object

Same logic as in MinimizingMakeChange except that we are using the new audit capabilities provided by JGAP 2.2

Since:
2.2

Constructor Summary
CoinsExample()
           
 
Method Summary
static void main(java.lang.String[] args)
           
static void makeChangeForAmount(int a_targetChangeAmount)
          Executes the genetic algorithm to determine the minimum number of coins necessary to make up the given target amount of change.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CoinsExample

public CoinsExample()
Method Detail

makeChangeForAmount

public static void makeChangeForAmount(int a_targetChangeAmount)
                                throws java.lang.Exception
Executes the genetic algorithm to determine the minimum number of coins necessary to make up the given target amount of change. The solution will then be written to System.out.

Parameters:
a_targetChangeAmount - the target amount of change for which this method is attempting to produce the minimum number of coins
Throws:
java.lang.Exception
Since:
1.0

main

public static void main(java.lang.String[] args)

JGAP