Volume of cubes and rectangular prisms