From f4994cec124d846b056bb22f2ec55f555ab85fed Mon Sep 17 00:00:00 2001 From: pefzt8hv9 <1843922375@qq.com> Date: Tue, 12 Oct 2021 00:54:17 +0800 Subject: [PATCH] ADD file via upload --- 面向对象体系架构.cpp | 38 ++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 面向对象体系架构.cpp diff --git a/面向对象体系架构.cpp b/面向对象体系架构.cpp new file mode 100644 index 0000000..b6ddd79 --- /dev/null +++ b/面向对象体系架构.cpp @@ -0,0 +1,38 @@ +#include +#include +using namespace std; +class Point +{ + public: + void setPoint(string a,int b,string c); //�����ڶԳ�Ա������������ + void printPoint(); + + private: + string name; + int age; + string sex; +}; + +void Point::setPoint(string a,int b,string c) //ͨ������������� '::' ʵ��setPoint���� +{ + name=a; + age=b; + sex=c; +} + +void Point::printPoint() //ʵ��printPoint���� +{ + cout<< "name = " << name << endl; + cout<< "age= " << age << endl; + cout<<"sex="<