How can I make this work? I need to implement this interface in Rectangular class and a few other classes. The thing is that one class needs to use this method with one value, the other with two and so on. When overriding the method in the class I get the error: cannot be resolved to a type
interface CalculateArea
{
public int Calculate(int... values);
}
class Rectangular implements CalculateArea
{
int width;
int hight;
int Area;
public Rectangular()
{
System.out.println("No arguments given");
}
public Rectangular(int width, int hight)
{
this.width=width;
this.hight=hight;
Area = Calculate(width, hight);
}
@Override
public int Calculate(int width, int hight)
{
return (width * width);
}