From a2e82b3847f346fb5449ea57384c21c04a984558 Mon Sep 17 00:00:00 2001 From: AhmadG1 Date: Mon, 4 Feb 2019 23:24:31 +0300 Subject: [PATCH 1/2] All right --- .DS_Store | Bin 0 -> 6148 bytes geom.js | 38 ++++++++++++++++++++++++++++++++++++++ pull_request_template.md | 9 +++++---- 3 files changed, 43 insertions(+), 4 deletions(-) create mode 100644 .DS_Store diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..bd4e63d44a2c2e2f5f863185bc308706c668c13d GIT binary patch literal 6148 zcmeHKOHKko5PgLhK{qT}&e9c$H<%DKajOSFe({sRL6OAe9K%C-0B?h@syc)b+!{lw zNcHPaz3S=LWO^Ea^jFghpaY;qS8TLd>@giz-?2vOIVOtb=-~;=>!O^Di=F7`_>T(c z-ksncGnANPYyZkINAz!TML%Dgu?C#t5zm;C@y_@MypdPzzzPL_ zL%fpt!qyB+a)Yv@OesPcbKZALHu>qsiG8jGfdo+v+~H zR;N!J77By{p}?Ulz%yH|b>;K5xnq=}KqydG;K-XD zJ^wF%zyH@s(Fz4ZfrC;&nuFUxpG!(->(1iztj*|mbTy5u95)nJ>?mfe9>ra{8T&J> V5c7nUBYSA^Az(5@5eodN0^c?7QAq#* literal 0 HcmV?d00001 diff --git a/geom.js b/geom.js index d942747..a6c9ac7 100644 --- a/geom.js +++ b/geom.js @@ -3,7 +3,13 @@ class Rectangle { this.length = length; this.width = width; } + area() { + console.log(this.width * this.length); + } } +let square = new Rectangle(10, 10); + + class Triangle { @@ -12,7 +18,13 @@ class Triangle { this.sideB = sideB; this.sideC = sideC; } + area(){ + console.log(this.sideA, this.sideB, this.sideC); + } } +let equilateral = new Triangle() +let isosceles = new Triangle() +let obtuse = new Triangle() class LineSegment { @@ -30,3 +42,29 @@ module.exports = { Triangle: Triangle, LineSegment: LineSegment } + + +class Animal { + constructor(type, age, sound) { + this.type = type; + this.age = age; + this.sound = sound; + } + + getOlder() { + this.age++; + console.log(this.age); + } + + makeSound() { + console.log(this.sound + "! Hello, I'm a " + this.type + ". And I'm " + this.age + " years old."); + + } +} + +let dog = new Animal("Dog", 1, "Woof"); +console.log(dog); + + +let cat = new Animal("Cat", 2, "Meow"); +console.log(cat); \ No newline at end of file diff --git a/pull_request_template.md b/pull_request_template.md index a911ef9..7491a71 100644 --- a/pull_request_template.md +++ b/pull_request_template.md @@ -1,14 +1,15 @@ ### How difficult did you find this (0 - 10)? (0 very easy, 10 very difficult) - +4 ### How long did it take? - +Usually everytime when i try to solve a problem, it takes me too much time to figure out how to solve it, and i fear this is my greatest weakness. ### Was there anything that you struggled with? If so, what? - +Not really but i couldnt finish with the homework because the time is getting late and i didnt want to spend the night. (sorry) ### Is there anything that you would like some further information on? - +The homework is very clear and smooth. Thank you! ### Do you have any suggestions to improve this assignment? +Non From 32d1c91c33b1d28ac4f9c62a87a9d9754108f2d9 Mon Sep 17 00:00:00 2001 From: AhmadG1 Date: Mon, 4 Feb 2019 23:33:25 +0300 Subject: [PATCH 2/2] All right --- geom.js | 28 +--------------------------- 1 file changed, 1 insertion(+), 27 deletions(-) diff --git a/geom.js b/geom.js index a6c9ac7..59a438d 100644 --- a/geom.js +++ b/geom.js @@ -41,30 +41,4 @@ module.exports = { Rectangle: Rectangle, Triangle: Triangle, LineSegment: LineSegment -} - - -class Animal { - constructor(type, age, sound) { - this.type = type; - this.age = age; - this.sound = sound; - } - - getOlder() { - this.age++; - console.log(this.age); - } - - makeSound() { - console.log(this.sound + "! Hello, I'm a " + this.type + ". And I'm " + this.age + " years old."); - - } -} - -let dog = new Animal("Dog", 1, "Woof"); -console.log(dog); - - -let cat = new Animal("Cat", 2, "Meow"); -console.log(cat); \ No newline at end of file +} \ No newline at end of file