Challenge 1: Implement the Rectangle Class
Can you implement a rectangle class using the concepts of encapsulation? A solution is placed in the "solution" section to help you, but we 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. Declare two fields, length
and width
and implement a parameterized constructor which assigns parameters to ...