You must define a class Packet that represents a small telemetry packet sent from a sensor module.
Your class must:
int idint temperatureint humidityid and initializes temperature and humidity to 0void update(int t, int h)temperature and humidityvoid print()ID=<id> TEMP=<temperature> HUM=<humidity>main():id, t1, h1, t2, h2Packet object with the given idupdate(t1, h1)update(t2, h2)print()Example Input:
7 20 40 25 45Example Output:
ID=7 TEMP=25 HUM=45 Constraints:
id, temperature, humidity) must be privatetemperature and humidity to 0
Input
7 20 40 25 45
Expected Output
ID=7 TEMP=25 HUM=45