文件名称:Cpp2
-
所属分类:
- 标签属性:
- 上传时间:2014-07-15
-
文件大小:656.17kb
-
已下载:1次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
设计一个名为MyPoint 的类,表示直角坐标系中的一个点。这个类包含:
(1)两个数据域x 和y,表示坐标。
(2)一个无参构造函数,创建一个点(0,0)。
(3)一个构造函数,按给定的坐标创建一个点。
(4)x 和y 的获取器函数。
(5)一个名为 distance()的函数,返回当前点和另一个给定的 MyPoint 类型的点之间的距离。
编写一个测试程序,它创建两个点(0,0)和(10,30.5), 并输出两点之间的距离。-MyPoint design named class in the Cartesian coordinate system represents a point. This class includes:
(A) two data fields x and y, and said coordinates.
(2) a no-argument constructor, create a point (0,0).
(3) a constructor, given the coordinates by creating a point.
(4) x and y acquirer functions.
(5) a function named distance (), returning from a given point to another point and MyPoint type between the current.
Write a test program that creates two points (0,0) and (10,30.5), and outputs the distance between two points.
(1)两个数据域x 和y,表示坐标。
(2)一个无参构造函数,创建一个点(0,0)。
(3)一个构造函数,按给定的坐标创建一个点。
(4)x 和y 的获取器函数。
(5)一个名为 distance()的函数,返回当前点和另一个给定的 MyPoint 类型的点之间的距离。
编写一个测试程序,它创建两个点(0,0)和(10,30.5), 并输出两点之间的距离。-MyPoint design named class in the Cartesian coordinate system represents a point. This class includes:
(A) two data fields x and y, and said coordinates.
(2) a no-argument constructor, create a point (0,0).
(3) a constructor, given the coordinates by creating a point.
(4) x and y acquirer functions.
(5) a function named distance (), returning from a given point to another point and MyPoint type between the current.
Write a test program that creates two points (0,0) and (10,30.5), and outputs the distance between two points.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
C++实验2/
C++实验2/Debug/
C++实验2/Debug/MyPoint.obj
C++实验2/Debug/TestMyPoint.obj
C++实验2/Debug/test2.exe
C++实验2/Debug/test2.ilk
C++实验2/Debug/test2.pch
C++实验2/Debug/test2.pdb
C++实验2/Debug/vc60.idb
C++实验2/Debug/vc60.pdb
C++实验2/MyPoint.cpp
C++实验2/MyPoint.h
C++实验2/TestMyPoint.cpp
C++实验2/test2.dsp
C++实验2/test2.dsw
C++实验2/test2.ncb
C++实验2/test2.opt
C++实验2/test2.plg
C++实验2/Debug/
C++实验2/Debug/MyPoint.obj
C++实验2/Debug/TestMyPoint.obj
C++实验2/Debug/test2.exe
C++实验2/Debug/test2.ilk
C++实验2/Debug/test2.pch
C++实验2/Debug/test2.pdb
C++实验2/Debug/vc60.idb
C++实验2/Debug/vc60.pdb
C++实验2/MyPoint.cpp
C++实验2/MyPoint.h
C++实验2/TestMyPoint.cpp
C++实验2/test2.dsp
C++实验2/test2.dsw
C++实验2/test2.ncb
C++实验2/test2.opt
C++实验2/test2.plg
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.