-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
Requirements
The constructor should take an array as an argument, this will contain 3 integers of the form [width, length, height] from which the Block should be created.
Examples
let b = new Block([2,4,6]) -> creates a Block object with a width of 2 a length of 4 and a height of 6
b.getWidth() // -> 2
b.getLength() // -> 4
b.getHeight() // -> 6
b.getVolume() // -> 48
b.getSurfaceArea() // -> 88
Your Test Cases:
let block = new Block([2,4,6]);
Test.assertEquals(block.getWidth(), 2)
Test.assertEquals(block.getLength(), 4)
Test.assertEquals(block.getHeight(), 6)
Test.assertEquals(block.getVolume(), 48)
Test.assertEquals(block.getSurfaceArea(), 88)
where By
http://www.codewars.com/kata/55b75fcf67e558d3750000a3/train/javascript
Metadata
Metadata
Assignees
Labels
No labels