#include <iostream> using namespace std; class UART { int baudRate,N; public: // your code here: define constructor with parameters baudRate and parity UART(int bd,int n) { baudRate=bd; N=n; std::cout<<"UART initialized with baud="<<baudRate<<", "<<"parity=N"<<std::endl; } }; int main() { UART u(9600, 'N'); return 0; }
Test Cases
Test Results
Input
Expected Output
UART initialized with baud=9600, parity=N