commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rwaldh...@apache.org
Subject cvs commit: jakarta-commons-sandbox/functor/src/test/org/apache/commons/functor/example/kata/one SupermarketPricingExample.java
Date Mon, 01 Dec 2003 22:01:15 GMT
rwaldhoff    2003/12/01 14:01:15

  Modified:    functor/src/test/org/apache/commons/functor/example/kata/one
                        SupermarketPricingExample.java
  Log:
  add comments
  
  Revision  Changes    Path
  1.2       +18 -2     jakarta-commons-sandbox/functor/src/test/org/apache/commons/functor/example/kata/one/SupermarketPricingExample.java
  
  Index: SupermarketPricingExample.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/functor/src/test/org/apache/commons/functor/example/kata/one/SupermarketPricingExample.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- SupermarketPricingExample.java	1 Dec 2003 05:29:08 -0000	1.1
  +++ SupermarketPricingExample.java	1 Dec 2003 22:01:15 -0000	1.2
  @@ -69,6 +69,22 @@
   import org.apache.commons.functor.core.composite.ConditionalUnaryFunction;
   
   /**
  + * Dave Thomas's Kata One asks us to think about how one might 
  + * implement pricing rules:  
  + * 
  + * "Some things in supermarkets have simple prices: this can of 
  + * beans costs $0.65. Other things have more complex prices. 
  + * For example:
  + *
  + * o three for a dollar (so what?s the price if I buy 4, or 5?)
  + *
  + * o $1.99/pound (so what does 4 ounces cost?)
  + * 
  + * o buy two, get one free (so does the third item have a price?)"
  + * 
  + * Functors provide one approach to this sort of problem, and in
  + * this example we'll demonstrate some simple cases.
  + *  
    * See http://pragprog.com/pragdave/Practices/Kata/KataOne.rdoc,v
    * for more information on this Kata.
    * 
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message