CSE 109 Test 2 20 November 2002 >>>>>>>>>>>>>>SUGGESTED ANSWERS<<<<<<<<<<<<<<<<<<<<<<<<< 1. Given the class A below, write the declaration and definition (code) for B, a subclass of A so that the code below the first dashed line produces all four characters of the output below the second dashed line. class A {public: A(int x=0); int get(); //returns the value of data private: int data; }; --------------------------------------------------- B a(20); a.display(); --------------------------------------------------- [20] ===================================================== class B : public A {public: B(int x=0); void display(); }; B::B(int x):A(x){} void B::display(){cout<<'['<