public class RectanglePerimeter {
public double perimeterCalculator(double length, double breadth) {
return 2 * (length + breadth);
}
}
public class Main {
public static void main(String[] args) {
RectanglePerimeter perimeter = new RectanglePerimeter();
System.out.println(perimeter.perimeterCalculator(10.5, 1.2));
}
}
Comments
Leave a comment