继承与派生应该如何编写程序

1.设计一个基类A和派生类B。要求:
(1)基类A没有成员函数,只有两个protected访问属性的int数据成员a和b。.
(2)派生类新增两个私有的int数据成员c和d,另外新增两个公用成员函数getValue()和show()分别用于输人和输出派生类中所有数据成员(包括a,b,c,d)。。
(3)在主函数中定义派生类B的对象,分别输入和输出对象的所有成员。
(4)要求采用三种继承方式验证。。

#include <iostream>
using namespace std;
class A
{
    protected:
      int a,b;
};
class B:public A
{
    private:
        int c,d;
    public:
        void getValue(int aa,int bb,int cc,int dd) {a=aa;b=bb;c=cc;d=dd;}
        void show() {cout<<a<" "<<b<<" "<<c" "<<d;}
};
int main()
{
    B b;
    b.getValue(1,2,3,4);
    b.show();
    return 0;
}