Create an `Item` class with a private integer `price`. Provide a constructor to set it. Create a getter method `int getPrice() const` that strictly promises not to modify object state. Read an integer, instantiate the object, and print ‘Price: [val]’.
A single integer.
Print the formatted price.
None
250
Price: 250
Appending `const` to the end of a member function declaration guarantees that the function will not modify any member variables of the calling object.
#include <iostream>
class Item {
// Define private state, constructor, and const getter
};
int main() {
// Read input, instantiate Item, 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