文件名称:li
介绍说明--下载内容均来自于网络,请自行研究使用
1、设计一个卡车类Truck,其中含有数据成员s和h,分别表示卡车的时速和行驶的时间,使用类的成员函数kilo计算卡车行驶的总路程,并完成在main()函数中的相应调用。
2、FangWu类描述房屋这一概念,其中数据成员L和W表示房屋的长与宽,成员函数Area()计算房屋的面积。PersonFW类描述住户这一概念,它是FangWu的派生类,PersonFW类中新增数据成员number表示房屋所住的人数,成员函数Average()计算人均面积。请用C++代码描述这两个类。不必写出main()函数的实现。
-1, the design of a truck-type Truck, which contains the data members of s and h, respectively trucks traveling speed and time, the use of class member functions kilo calculated the total distance truck driving, and completed in the main () function calls the corresponding . 2, FangWu type described in the concept of housing, of which the members of L and W data that the length and width of the Housing Authority, members of Function Area () calculate the area of housing. Household type PersonFW descr iption of the concept, it is FangWu of the derived class, PersonFW Class members number in the new data indicated that the number of housing occupied by members function Average () in terms of per capita area. Please use C++ code to describe these two categories. Do not have to write a main () function to achieve.
2、FangWu类描述房屋这一概念,其中数据成员L和W表示房屋的长与宽,成员函数Area()计算房屋的面积。PersonFW类描述住户这一概念,它是FangWu的派生类,PersonFW类中新增数据成员number表示房屋所住的人数,成员函数Average()计算人均面积。请用C++代码描述这两个类。不必写出main()函数的实现。
-1, the design of a truck-type Truck, which contains the data members of s and h, respectively trucks traveling speed and time, the use of class member functions kilo calculated the total distance truck driving, and completed in the main () function calls the corresponding . 2, FangWu type described in the concept of housing, of which the members of L and W data that the length and width of the Housing Authority, members of Function Area () calculate the area of housing. Household type PersonFW descr iption of the concept, it is FangWu of the derived class, PersonFW Class members number in the new data indicated that the number of housing occupied by members function Average () in terms of per capita area. Please use C++ code to describe these two categories. Do not have to write a main () function to achieve.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
新建文本文档.txt