Make a Rectangle class with properties width and height. Add two prototype methods: getArea and isSquare. The
Fantastic news! We've Found the answer you've been seeking!
Question:
Make a Rectangle class with properties width and height. Add two prototype methods: getArea and isSquare. The getArea method should return the area of the rectangle, while the isSquare method should return true if the rectangle is a square(same width and height) and false otherwise.
Create two Rectangle objects: one with a width of 4 and a height of 10, and another with a width of 5 and a height of 5. The html style and code are already finished, you just need finish JS code.
Related Book For
Systems analysis and design
ISBN: 978-0136089162
8th Edition
Authors: kenneth e. kendall, julie e. kendall
Posted Date: