Fill up the blanks in the constructor to get the output as per the test cases.
Sample Test Cases
Input Output
Test Case 1. 5 D 6 C A
6 C A
Test Case 2. 9 I 10 H A
6 C A
Test Case 3. 6 A 7 @ A
6 C A
Test Case 4. 5 F 6 E A
6 C A
#include <iostream>
using namespace std;
class Sample {
public:
int data_ ;
char graph_, data_or_graph_;
Sample(int x =6,char y='C',char z='A'): data_(x), data_or_graph_(y),graph_(z) {
cout << data_ << " " << data_or_graph_ << " " << graph_ << " " << endl;
}
}; // End of the class
int main() {
int x; char y;
cin >> x >> y ;
Sample s1(x+1, y-1), s3;
return 0;
}