Package com.kjoshi.shareit.responsible

Examples of com.kjoshi.shareit.responsible.Area


*
*/
public class ChainOfResponsibility {
  public static void main(String[] args) {
    // I am keeping Circle in the last in the chain so starting from Circle
    Area circle = new Circle();
    Area triangle = new Triangle(circle);
    Area rectangle = new Rectangle(triangle);
    Area square = new Square(rectangle);
    for (String shape : listOfShapes()) {
      square.findArea(shape);
    }
  }
View Full Code Here

TOP

Related Classes of com.kjoshi.shareit.responsible.Area

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.