...

/

Challenge 1: Implement the Rectangle Class Using the Concepts of Encapsulation

Challenge 1: Implement the Rectangle Class Using the Concepts of Encapsulation

Can you implement the rectangle class using the concepts of encapsulation? A solution is placed in the "solution" section to help you, but we would suggest you try to solve it on your own first.

Problem Statement

You are given a partially completed code of a Rectangle class in the editor. Add two fields i.e. length and width and modify the default and parametrized constructors which assign ...