Create a `Thermometer` class with a private integer `temp`. In its setter `setTemp(int t)`, add validation: if the given temperature is below absolute zero (-273), set `temp` to exactly -273. Otherwise, set it to `t`. Print the result using a getter.
A single integer.
Print the validated temperature.
None
-300
Temp: -273
Setters allow you to intercept incoming data and sanitize or validate it before assigning it to the object's state.
#include <iostream>
class Thermometer {
// Define private state and public validated setter
};
int main() {
// Read temperature, assign via setter, and print
return 0;
}Embedded systems rely on efficient low-level programming to interact directly with hardware. In this course, you will learn how to write practical Embedded C programs used in real microcontroller-based systems. Rather than focusing only on theory, this course follows a practice-driven approach. Each lesson includes hands-on coding exercises that simulate real firmware development tasks used