f1005.cpp
资源名称:c.rar [点击查看]
上传用户:puke2000
上传日期:2022-07-25
资源大小:912k
文件大小:1k
源码类别:
C#编程
开发平台:
Visual C++
- //=====================================
- // f1005.cpp
- // compose or inheritant
- //=====================================
- #include"circle_compos.h" // or #include"circle_inher.h"
- #include<iostream>
- using namespace std;
- //-------------------------------------
- int main(){
- Point a(2.3, 5.6);
- Circle c(a, 7);
- c.moveTo(1, 2);
- c.modifyRadius(3);
- cout<<"The radius is "<<c.getRadius()<<"n";
- cout<<"The point is "<<c.getPoint();
- cout<<"The area is "<<c.getArea()<<"n";
- cout<<"The circumference is "<<c.getCircum()<<"n";
- }//====================================