Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Create a class named Temperature that contains the following members: A temp dat

ID: 3614668 • Letter: C

Question

Create a class named Temperature that contains the following members: A temp data member used to store a temperature A tot Temp static data member used to store the total of all temperatures entered by the user A member function that obtains a value of the temperature (temp) from the user and accumulates tot Temp-i.e., adds temp to the current value of tot Temp A static member function that computes and returns the weekly average temperature Design the moin() function to create an array of objects of the and call class member functions to obtain temperatures for a week from the user and compute and display the average temperature.

Explanation / Answer

please rate - thanks #include using namespace std; class Temperature {private: double temp; public: static double totTemp; void add() {couttemp; totTemp+=temp; } double getTot() {return totTemp;} }; double Temperature::totTemp =0; int main() { Temperature t[5]; int i; for(i=0;i
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote