Package com.theryanclark.op.core

Examples of com.theryanclark.op.core.Press


import com.theryanclark.op.input.Olive;

public class Main {
  public static void main(String[] args) {
    /* Give me olives, a press and a bucket; */
    Press press = new Press(new Olive[] {
      new GreenOlive(), new BlackOlive(),
      new GreenOlive(), new BlackOlive(),
      new GreenOlive()
    }); // add five olives
   
    press.add_olives(new Olive[] {
      new BlackOlive(), new GreenOlive(),
      new BlackOlive(), new GreenOlive(),
      new BlackOlive()
    }); // add five more olives
   
    /* Run the machine and fill up our bucket; */
    Oil bucket = press.crush();
   
    /* Total amount of how much Olive Oil we have; */
    System.out.println( "You have " + bucket.get_amount() + " units of oil." );
  }
View Full Code Here

TOP

Related Classes of com.theryanclark.op.core.Press

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.