+ 1
Write a program to find area of rectangle and volume of cuboid using simple inheritance
Can any body solve this in best way
4 Answers
+ 3
var cuboid = {
length: 25,
width: 50,
height: 200
};
//your code goes here
var x = cuboid.length
var y = cuboid.width
var z = cuboid.height
console.log(x*y*z);
+ 6
Shabista Imam , yes we can, but its YOUR task to do this by yourself. Do a try, if you get stuck somewhere come back and post your attempt here so that we can help you. Thanks!
+ 1
I have attempted many times by class and extend class but wants in more efficient way
0
Shabista Imam if you show your attempt then other understand what you looking and try to share their ways..