using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace yu1
{
class CPoint
{
public double x, y;
public CPoint() { }//这个函数必须要有,不知道为什么,而且所有构造函数前都要加piblic。
public CPoint(double x, double y)
{
this.x = x;
this.y = y;
}
public double get_x()
{
return x;
}
&
CPoint作为基类,派生出描述一条直线的类Cline,再派生出一个矩形类CRect。要求成员函数能求出两点间的距离、矩形的周长和面积等
最新推荐文章于 2022-06-12 13:13:51 发布