logo

Crowdly

Specifies a Square class with a side field and a method for calculating the per...

✅ Перевірена відповідь на це питання доступна нижче. Наші рішення, перевірені спільнотою, допомагають краще зрозуміти матеріал.

Specifies a

Square class with a side field and a method for calculating the perimeter of a square

class Square {

    constructor(side) {

        this.side = side;

    }

    calculatePerimeter(){

        return this.side * 4;

    }

}

Based on the Square class, a Cube class is created

and the method that returns the perimeter is

overrided.

Override the

calculatePerimeter() method

with extension - use parent method result for calculations.

100%
0%
0%
0%
0%
Більше питань подібних до цього

Хочете миттєвий доступ до всіх перевірених відповідей на softserve.academy?

Отримайте необмежений доступ до відповідей на екзаменаційні питання - встановіть розширення Crowdly зараз!