Question: please explain all steps 1. Write a java program to create a class Rectangle. The class has attributes Length and Width. It should have methods
please explain all steps
1. Write a java program to create a class Rectangle. The class has attributes Length and Width. It should have methods that calculate Area and Perimeter of the Rectangle. Each set method for length and width should verify that length and width are double point numbers larger than 0 and less than 50. Each get method shows the values of length and width. Write a class TestRectangle to test the class Rectangle. In the TestRectangle, each method of Rectangle class needs to be called with the input entered from screen and display the results. (5 pts) 2. Write a java program to create a class Employee. The class should include three instance variables: name (type: String), ID (type: int), and position (type: String). Write a class TestEmployee to test the class Employee. Read the name, ID and position of three employees from screen input, create three employee objects using the constructor, and display each employee's name, ID and position. (5 pts)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
