From 7e7008250385fb1c9e3b7f2f687cb56d91b438e4 Mon Sep 17 00:00:00 2001 From: Abdullah-1985 Date: Tue, 5 Feb 2019 15:34:28 +0300 Subject: [PATCH] home work --- geom.js | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/geom.js b/geom.js index d942747..98135b1 100644 --- a/geom.js +++ b/geom.js @@ -3,7 +3,20 @@ class Rectangle { this.length = length; this.width = width; } + checkIsSqure(){ + this.lengh === this.width; + return true } +calcArea (){ + this.lenght = this.lenght *this.Width; + +} +calcperimeter(){ +this.lenght = 2*(this.length + this.width); + } +} + + class Triangle { @@ -12,7 +25,21 @@ class Triangle { this.sideB = sideB; this.sideC = sideC; } + isEquilateral(){ + + if(this.sideA === this.sideB === this.sideC) { + + return True } + +} +isIsosceles() { +if(this.sideA === this.sideB !== this.sideC){ + return True +} + +} + class LineSegment {