文件名称:Class-and-object-
介绍说明--下载内容均来自于网络,请自行研究使用
1. 建立一个对象数组,内放5个学生的数据(学号、成绩)。请根据下面要求实现类中的功能,其他的函数根据需要创建。
(1). 用指针指向数组首元素,输出第1,3,5个学生的数据。
(2). 以对象指针作为形式参数找出5个学生中学习成绩最高者。注:函数名为max
2. 定义一个圆类,分别用以下方法计算圆的面积和周长。
(1). 用成员函数实现求圆的面积和周长。
(2). 用友元函数求圆的面积和周长
-(1) create an array of objects, put the data of the five students (results). According to the following requirements in the class of functions, and other functions need to create. (1) with a pointer to the first element of the array, the output data of 1, 3 and 5 students. (2). Object pointer as a formal parameter to identify the five students in grades. Note: function called max 2 define a circle class, use the following methods to calculate the circle area and perimeter. (1) member function of circular area and perimeter. (2). UF Function round the area and perimeter
(1). 用指针指向数组首元素,输出第1,3,5个学生的数据。
(2). 以对象指针作为形式参数找出5个学生中学习成绩最高者。注:函数名为max
2. 定义一个圆类,分别用以下方法计算圆的面积和周长。
(1). 用成员函数实现求圆的面积和周长。
(2). 用友元函数求圆的面积和周长
-(1) create an array of objects, put the data of the five students (results). According to the following requirements in the class of functions, and other functions need to create. (1) with a pointer to the first element of the array, the output data of 1, 3 and 5 students. (2). Object pointer as a formal parameter to identify the five students in grades. Note: function called max 2 define a circle class, use the following methods to calculate the circle area and perimeter. (1) member function of circular area and perimeter. (2). UF Function round the area and perimeter
(系统自动生成,下载前可以参看下载内容)
下载文件列表
4类和对象二\work1.cpp
...........\work2-2.cpp
...........\work2.cpp
...........\~$第四次实验.doc
4类和对象二
...........\work2-2.cpp
...........\work2.cpp
...........\~$第四次实验.doc
4类和对象二