class b public a public return getto void main Bb b setx(2) b sety (3) cout<<X=<<bgetxo<<tY=<<b gety(<<endl cout<<X+Y=<<b getsum(<<endlclass B:public A { public: int getsum() { return x + gety(); } }; void main() { B b; b.setx(2); b.sety(3); cout<<"X="<<b.getx()<<"\tY="<<b.gety()<<endl; cout<<"X + Y = "<<b.getsum()<<endl; }