You must define a class Packet that represents a small telemetry packet sent from a sensor module.
Packet
Your class must:
int id
int temperature
int humidity
id
temperature
humidity
0
void update(int t, int h)
void print()
ID=<id> TEMP=<temperature> HUM=<humidity>
main()
t1
h1
t2
h2
update(t1, h1)
update(t2, h2)
print()
Example Input:
7 20 40 25 45
Example Output:
ID=7 TEMP=25 HUM=45
Constraints:
Test Cases
Test Results
Input
Expected Output