1.编写两个类,一个为father,一个为child类,father为父类,child为子类,且每个累中至少包含一个方法。

来源:百度知道 编辑:UC知道 时间:2024/06/21 14:27:11
1.编写两个类,一个为father,一个为child类,father为父类,child为子类,且每个累中至少包含一个方法。
2.假设d:盘有一个student.mdb表,请利用OleDbDataAdapter对象实现将student.mdb中数剧显示在Form1窗体的DataGrid1控件上,写出点击Button1按钮显示数剧代码。Private sub button1_clikck

End sub

用c还是java.

我用c给你编一个

#include <iostream.h>
#include <string.h>
class father
{
char name[10];
char sex;
int age;
public father(char *n,char s,int a):sex(s),age(a){strcpy(name,n)}
void work(){cout<<"work hard!"<<endl;}
public ~father(){}
};

class child:public father
{
public child(char *n,char s,int a):sex(s),age(a){strcpy(name,n)}
void study(){cout<<"study hard!"<<endl;}
public ~child(){}
};

你那叫C++...

貌似用C#比较好做~~~