Created
January 10, 2016 19:04
-
-
Save alexnm/ff8b3d88f342d1585cb6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Rectangle extends Shape { | |
constructor( x, y, color ) { | |
super( color ); | |
this.x = x; | |
this.y = y; | |
this.color = color | |
} | |
get length( ) { | |
return x; | |
} | |
get width( ) { | |
return y; | |
} | |
set color( c ) { | |
this.color = c; | |
} | |
static numberOfEdges( ) { | |
return 4; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment