Question: Problem 1(5 points) - Collecting User input Write a Java class named RectangleData. The class is to be written as an application class. The class

Problem 1(5 points) - Collecting User input Write a Java class named RectangleData. The class is to be written as an application class. The class is to do the following: The class is to prompt the user to enter data for a rectangle. First, the program is to prompt the user to enter the length of a rectangle. Next, the program is to prompt the user to enter the width of the same rectangle. Data is to be entered and processed as integers. As output, the program will display the area of the rectangle and the perimeter of the rectangle. The formula to calculate the area is: length x width. The formula to calculate the perimeter is 2L + 2W. Note: the program prompts are to look like the sample run below, where the values 5 and 3 are entered by the user, and using these values, the program out displays the values shown in the example. . Sample Program Run Please enter the length of the rectangle: 5 Please enter the width of the rectangle: 3 The area is: 15 The perimeter is: 16
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
