Volume of a cube

Report a typo

Given a class named Box. It has three double properties.

Write a member function to calculate the volume of the box. The function must be named as getVolume. It should take no arguments and return a double result.

Write a program in Kotlin
class Box(var height: Double, var width: Double, var length: Double) {

// write the getVolume method here
}
___

Create a free account to access the full topic