Question: Write a program to print the area of a rectangle by creating a class named Rectangle with constructor having the two sides (width and height)
Write a program to print the area of a rectangle by creating a class named Rectangle with constructor having the two sides (width and height) as its parameters
Test the class by creating a main class which contains the main method name the class TestRectangle
Use the Scanner library to take the two sides as inputs from the console.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
