Create the logic for a program that continuously prompts the user for two numeric values that represent the sides of a rectangle. Include two overloaded methods that compute a rectangle’s area. One method takes two numeric parameters and calculates the area by multiplying the parameters. The other takes a single numeric parameter, which is squared to calculate area. Each method displays its calculated result. Accept input and respond as follows:
• When the user enters a negative number for the first value, end the program.
• If the user enters a negative number for the second value, continue to reprompt the user until the second value is not negative.
• If bothnumbers entered are greater than 0, call the method version that accepts two parameters and pass it bothvalues.
• If one of the values entered is 0 but the other is not, call the version of the method that accepts just one parameter and pass it the nonzero value.
• If boththe entered values are 0, display an error message.
We need at least 10 more requests to produce the solution.
0 / 10 have requested this problem solution
The more requests, the faster the answer.