文件名称:4_2
-
所属分类:
- 标签属性:
- 上传时间:2014-04-13
-
文件大小:654byte
-
已下载:0次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
定义一个立方体类,包含的数据成员有立方体的左上角坐标位置和右下角坐标位置,并实现如下要求。
要求: 1)构造函数带入两个三维坐标点位置来初始化成员变量;
2)另一个构造函数带入一个坐标点位置和一个边长来构造一个正方体;
3)一个成员函数求立方体的中心;
4)一个成员函数来获取立方体的体积和表面积;
5)添加静态成员变量统计当前有多少个对象处于生存期,添加静态成员变量表示一个生成过多少个对象;
6)添加静态成员函数获取上面的两个静态成员变量。
7)要有主函数测试所写的功能。-Define a cube class contains data members are left coordinate position and the coordinate position of the lower right corner of the cube, and to achieve the following requirements.
Requirements: 1) into the two-dimensional coordinates constructor to initialize member variables point
2) another constructor into a coordinate position and a side to construct a cube
3) A member function evaluation center of the cube
4) a member function to get the cube of volume and surface area
5) Add a static member variable statistics how many objects are in the current lifetime, add a static member variable represents a generation how many objects
6) Add a static member function to get the above two static member variables.
7) The main function tests have written functions.
要求: 1)构造函数带入两个三维坐标点位置来初始化成员变量;
2)另一个构造函数带入一个坐标点位置和一个边长来构造一个正方体;
3)一个成员函数求立方体的中心;
4)一个成员函数来获取立方体的体积和表面积;
5)添加静态成员变量统计当前有多少个对象处于生存期,添加静态成员变量表示一个生成过多少个对象;
6)添加静态成员函数获取上面的两个静态成员变量。
7)要有主函数测试所写的功能。-Define a cube class contains data members are left coordinate position and the coordinate position of the lower right corner of the cube, and to achieve the following requirements.
Requirements: 1) into the two-dimensional coordinates constructor to initialize member variables point
2) another constructor into a coordinate position and a side to construct a cube
3) A member function evaluation center of the cube
4) a member function to get the cube of volume and surface area
5) Add a static member variable statistics how many objects are in the current lifetime, add a static member variable represents a generation how many objects
6) Add a static member function to get the above two static member variables.
7) The main function tests have written functions.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
4_2.cpp
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.