Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a java program that prompts the user to enter the center (x,y) coordinates, width, and height of two rectangles. Your program should then determine

Write a java program that prompts the user to enter the center (x,y) coordinates, width, and height of two rectangles.

Your program should then determine one of the following situations:

- The first rectangle is inside the second rectangle

- The second rectangle is inside the first rectangle

- The rectangles overlap (their boundaries cross each other)

- The rectangles do not touch each other, neither is inside of the another

Test your program to cover all cases.

You should return 4 screenshots of the output of your program run showing the values entered and the output of the program for 4 different input value set, each corresponding a different situation cited above. Your screenshots should be in one of the well-known picture formats, such as jpg or gif.

You should also send your java source code in a program code file with a name similar to your_surname.java.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Intranet And Web Databases For Dummies

Authors: Paul Litwin

1st Edition

0764502212, 9780764502217

More Books

Students also viewed these Databases questions

Question

Explain the function and purpose of the Job Level Table.

Answered: 1 week ago