volume method

  1. @override
double volume()
override

Get the volume of this shape

Implementation

@override
double volume() {
  return (4.0 * math.pi * math.pow(radius, 3)) / 3.0;
}