This commit is contained in:
estomm
2021-09-14 17:12:52 +08:00
parent 6b7792f012
commit 837d003097
2 changed files with 24 additions and 0 deletions

View File

@@ -1,5 +1,28 @@
#include<iostream>
using namespace std;
class Wood{
private:
int length;
int width;
public:
int get_length(){
return this->length;
}
int get_width(){
return this->width;
}
};
class desk:public wood{
private:
int height;
public:
int get_height(){
return this->height;
}
};
int add(int a,int b){
int c = a+b;
return c;

View File

@@ -0,0 +1 @@
1. 关于封装的讨论。