Frame a class UART with the following:
baudRate (integer)
parity (character: 'N' = None, 'E' = Even, 'O' = Odd)
UART(int baudRate, char parity)
void showConfig() const → prints the UART configuration in the format: Baud=<baudRate> Parity=<parity>
void showConfig() const
Baud=<baudRate> Parity=<parity>
The input will contain two values:
baudRate
parity
Example Input:
9600 N
Output:
Baud=9600 Parity=N
Here, baudRate = 9600, parity = N.
Input:
115200 E
Baud=115200 Parity=E
Here, baudRate = 115200, parity = E.
Test Cases
Test Results
Input
Expected Output