Question: IN C++ SOLVE THIS ERROR PLEASE Attached below is my code for a project. -Can you help me fix the circled errors on the bottom/what
IN C++ SOLVE THIS ERROR PLEASE
Attached below is my code for a project.



-Can you help me fix the circled errors on the bottom/what they mean and how to fix them so it can build without error?
-Can you help me fix the 3 errors with the word "assert" (it says it is undefined), my header file is shown below so you can derive what is supposed to be related to the length.

Thanks!
1 Project1_For_C++ () main_savitch_2C #include // Provides toupper 2 #include // Provides setw to set the width of an output 3 #include // Provides cout, cin 4 #include // Provides EXIT_SUCCESS 5 #include "stats.h" 6 La namespace main_savitch_2C { 7 main_savitch_2C::statistician::statistician() { 8 - 9 count = 0; } I statistician main_savitch_2C::operator+(const statistician& si, const statistician& s2) { statistician result; s2.mean(); 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 if (s1.length() == 0) return 52; if (s2.length() == 0) return sl; result.count = s1.length() + s2.length(); result.total = s1.length s1.mean() + s2.length() if (s1.minimum() s2.maximum()) result. largest = s1.maximum(); else result. largest = s2.maximum(); return result; statistician main_savitch_2C::operator*(double scale, const statistician& s) { statistician result; if (s.length() == ) return s; result.count = s.length(); result.total = scale s.mean() * s.length(); result.tiniest = scale * s.minimum(); result.largest = scale * s.maximum(); return result; 44 $ Project1_for_C++ main_savitch_2C::main_savitch_2C::statistician 40 result.tiniest = scale * s.minimum(); 41 result.largest = scale * s.maximum(); 42 return result; 43 43 } 45 bool main_savitch_2C::operator==(const statistician& si, const statistician& s2) { ac 46 47 if (51.length() != 52.length() 48 return false; 49 if (s1.length() == %) 50 return true; 51 return ((51.mean() == s2.mean() && 52 (s1.sum() == 52.sum()) && 53 (51.minimum() == 52.minimum()) && 54 FA 3+ (51.maximum() == s2.maximum()); 55 EC 56 57 58 58 void main_savitch_20::statistician:: next(double r) { 50 59 ca 60 if (count == ) cm 61 { co 62 total = r; ca 63 tiniest = r; 64 GA 04 largest = r; 65 66 66 else 67 67 { 68 total += r; 69 if (r largest) largest = r; 71 72 count++; 73 74 } 75 76 void main_savitch_20::statistician::reset() { 77 78 TL count = 0; 79 80 81 -+ -- -- -- -- -- -- --length( can - - 9 Project1_For_C++ () main savitch_2C 74 void main_savitch_20::statistician::reset() { count = 0; int main_savitch_2C::statistician:: length() const{ return count; } double main_savitch_20::statistician::sum() const{ return total; double main_savitch_2C::statistician::mean() const{ assert (length() > 0); return (double(total) / double(count)); double main_savitch_2C::statistician::minimum() const{ assert (length() > 0); return tiniest; double main_savitch_20::statistician::maximum() const{ 99 100 101 102 103 104 105 196 107 assert(length() > 0); return largest; 100 % Output Show output from: Build ata 1>stats.cpp 1>C:\Users\pigga\Desktop\C++\Project1_for_C++\Project1_for_C++\stats.cpp(83,51): error C2084: function 'int main_savitch_2C::statistician: :length(void) const' already has a body 1>C:\Users\pigga\Desktop\C++\Project1_for_C++\Project1_for_C++\stats.h(74): message : see previous definition of 'length 1>C:\Users\pigga\Desktop\C++\Project1_for_C++\Project1_for_C++\stats.cpp(87,51): error C2084: function 'double main_savitch_2C::statistician::sum(void) const' already has a body 1>C:\Users\pigga\Desktop\C++\Project1_for_C++\Project1_for_C++\stats.h(75): message : see previous definition of 'sum' 1>Done building project "Project1_for_C++.vcxproj" FAILED. ========== Build: a succeeded, 1 failed, up-to-date, skipped ========== 58 59 60 61 0 62 02 63 02 64 65 3 double Q#ifndef STATS_H // Prevent duplicate definition #define STATS_H #include namespace main_savitch_20 { class statistician { public: // CONSTRUCTOR statistician(); // MODIFICATION MEMBER FUNCTIONS void next(double r); void reset(); 1/ CONSTANT MEMBER FUNCTIONS int length() const { return count; double sum const { return total; } double minimum() const; double maximum() const; 1/ FRIEND FUNCTIONS friend statistician operator+(const statistician& si, const statistician& s2); friend statistician operator * (double scale, const statistician& s); 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 }; mean() const; // NON-MEMBER functions for the statistician class bool operator == (const statistician& si, const statistician& s2); } 90 91 92 93 94 Fendif