All submissions

Constructor with Parameters

#include <iostream>
using namespace std;

class UART {
public:
    // your code here: define constructor with parameters baudRate and parity
    UART(int baud, char n){
        cout << "UART initialized with baud="<<baud<<", "<<"parity="<<n<<endl;
    };
};

int main() {
    UART u(9600, 'N');
    return 0;
}
Loading...

Input

Expected Output

UART initialized with baud=9600, parity=N