Design and implement a class called statistician. After astatistician is initialized, it can be given a sequence of doublenumbers by invoking a member function next. For example, we candeclare a statistician called s, and then give it the sequence ofnumbers 1.1, -2.4, 0.8 as shown here: statistician s; s.next(1.1);s.next(-2.4); s.next(0.8); After a sequence has been given to astatistician, there are various member functions to obtaininformation about the sequence. Include member functions that willprovide the length of the sequence, the sum of all the numbers inthe sequence, the arithmetic mean of the numbers, the smallestnumber in the sequence, and the largest number in the sequence.Notice that the length and sum functions can be called at any time,even if there are no numbers in the sequence. In this case of an“empty” sequence, both length and sum will be zero. But the othermember functions all have a precondition requiring that thesequence is non-empty. Please implement stats.cpp given thefollowing stats.h header file

#ifndef STATS_H
#define STATS_H
class statistician
{
public:
// CONSTRUCTOR
statistician( );
// MEMBER FUNCTIONS
void next(double r);
// CONSTANT MEMBER FUNCTIONS
int length( ) const { return count; }
double sum( ) const { return total; }
double mean( ) const;
double minimum( ) const;
double maximum( ) const;
private:
int count; // How many numbers in the sequence
double total; // The sum of all the numbers in the sequence
double tiniest; // The smallest number in the sequence
double largest; // The largest number in the sequence
};
}
#endif

Please help. I haven’t done a programming assignment in manyquarters so I’m very rusty and having a hard time understandingwhere to start. Thanks!