/*
* 04737 c++ 自学考试2019版 第二章课后练习
* 程序设计题 2
* 需求:设计并实现二维坐标系下点的类Point....
*/
//标准流
#include<iostream>
//科学计算函数
#include<cmath>
using namespace std;
class Point
{
private:
//横坐标
double x;
//纵坐标
double y;
public:
//construtor
Point();
Point(double x1,double y1);
//getter
double getX();
double getY();
//setter
void setX(double x1);
void setY(double y1);
//计算给定点到0,0的距离
double distance(Point p);
//计算给定两点之间的距离
double distanceB2Points(Point p,Point p2);
//给定的三个点是否是三角形
bool isTriangle(Point p,Point p2,Point p3)
04737 c++ 自学考试2019版 第二章课后程序设计题 2
最新推荐文章于 2022-03-29 16:57:50 发布