Write a program that takes as input two opposite corners of a rectangle: (x1,y1) and (x2,y2).Assume the
Fantastic news! We've Found the answer you've been seeking!
Question:
Below are some testing examples
Enter x1: 1
Enter y1: 1
Enter x2: 1
Enter y2: 5
You have entered two points that fails to create a rectangle. Exiting the program
Enter x1: 0
Enter y1: 0
Enter x2: 3.5
Enter y2: 3.5
Enter x: 1.3
Enter y: 3.5
False
Enter x1:4
Enter y1: 4
Enter x2: 0
Enter y2: 0
Enter x: 2
Enter y: 2
True
Related Book For
Java An Introduction To Problem Solving And Programming
ISBN: 9780134462035
8th Edition
Authors: Walter Savitch
Posted Date: