Programming Example
Design a class to overload a function series( ) as follows:
- double series(double n) with one double argument and returns the sum of the series.
sum = (1/1) + (1/2) + (1/3) + .......... + (1/n) - double series(double a, double n) with two double arguments and returns the sum of the series.
sum = (1/a2) + (4/a5) + (7/a8) + (10/a11) + .......... to n terms
Study this program carefully to understand the logic, output, and explanation in a structured way.