Question: java language , plz solve the code by Eclipde compiler and take screenshot . Description of the program: 1. Create a class to represent a
Description of the program: 1. Create a class to represent a rectangle type in java, the class should have the following fields: Length: variable to hold the length of a rectangle. Width: variable to hold the width of a rectangle. 2. The class should have a method that prints out the values of the width and length of a rectangle along with its area. "area of rectangle= width x length". 3. In the main class, declare and instantiate 2 objects of the rectangle class. 4. Set the variables' values for both objects and call that prints out the values and the area of the rectangle
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
