#include <iostream>
using namespace std;

class LED {
public:
    // Method to turn the LED on
    void turnOn() {
        cout << "LED ON" << endl;
    }

    // Method to turn the LED off
    void turnOff() {
        cout << "LED OFF" << endl;
    }
};

int main() {
    LED led;        // Create an LED object
    led.turnOn();   // Call turnOn()
    led.turnOff();  // Call turnOff()
    return 0;
}
Upvote
Downvote
Loading...

Input

Expected Output

LED ON LED OFF