Model a `VendingMachine` handling `balance` and `price`. Accept deposit commands (`DEPOSIT x`), purchase (`BUY`), or refund (`REFUND`). Print final balance or item status directly.
Line 1: item price P. Line 2: N commands.
Print final balance float (2 decimals) or 'DISPENSED' / 'INSUFFICIENT' / 'REFUNDED'.
P > 0, N >= 1
2.00 3 DEPOSIT 1.00 DEPOSIT 1.00 BUY
DISPENSED
Deposited 2.00 matches price 2.00, item is dispensed.
#include <iostream>
#include <string>
class VendingMachine {
public:
// Write your code here
};
int main() {
// Implement I/O logic here
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