Answer:
System.out.println("Enter length:");
Scanner scan = new Scanner(System.in);
Double x = scan.nextDouble();
System.out.println("Enter 2 lengths:");
Double a = scan.nextDouble();
Double b = scan.nextDouble();
Rectangle rect = new Rectangle(x);
Rectangle rect2 = new Rectangle (a,b);
if (rect2.equals(rect)){
System.out.print("Congruent Rectangles");
}
else {
System.out.print("Different Rectangles");
}
}
}
Step-by-step explanation: