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

Please help me! Please do this as fast as possible. All code in C++ Create a Cla

ID: 3718717 • Letter: P

Question

Please help me!
Please do this as fast as possible. 
All code in C++

Create a Class named "Weather" that does the following.... There are two conditions, temperature and humidity. There should be a random number generated for humidity between 0 and 100. There should be a random number generated between -50 and 120 for temperature. There has to be a test function, where we test what happens after each test. Depending of the values for temperature and humidity, the class should display, the current weather(chilly, foggy, raining, sunny, overcast, hot, freezing, ect.)

Explanation / Answer

class weather

{

void test( int h, int t)

{

if (h < 10 )

{

cout <<"freezing";

}

if (h >10 && h < 20)

{

cout<<"chiily";

}

if(h >20 && h < 30 )

{

cout<<"foggy";

}

if(h < 40 && h > 30)

{

cout<<"overcast";

}

if(h <50 && h > 40 && t >60)

{

cout<<"raining";

}

if(h<60 && h<70)

{

cout<<"hot";

}

if(h>70)

{

cout<<"sunny";

}

}

};

temp = rand() % 120 - 50;

object.test( humidity, temp);

}

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