title: Create an abstract method without fixing the types of its parameters
body: <p>I'm trying to implement a Class structure, where I'm able to create Box-Objects of different types. These types are: <code>Squares, Circles, Rectangles and Hexagons</code>.</p>
  
  <p>For the abstract father <code>class Box</code> I'd like to specify a <code>setDimensions()</code> method that has to be implemented in all child objects.</p>
  
  <p>However, the dimension parameters for all objects are different (Except for the height):</p>
  
  <p><code>Circles</code> have a <code>diameter</code>, <code>Rectangles</code> have a <code>width and length</code>, and <code>Hexagons</code> and <code>Squares</code> have <code>equally sized sides</code>. </p>
  
  <p>Is it possible to define a Interface/abstract method that can handle this type of job?</p>
  
  <p>//EDIT: This is for a programming assignment. Obviously all classes have suitable constructors, but this program "simulates" a project where the implementation of a design pattern is supposed to be useful. I'm trying to apply the <code>prototype</code> pattern, where you clone a basic box and set the parameters based on another box that I would like to place in the new one. 
  I know it isn't a terribly good example, but we have to solve it that way. Alternatively a <code>factory pattern</code> is also an option, but I would like to avoid having to write too many factory classes.</p>