Description: 一个关于等边三角形的类Trival如下,其中的属性包括三角形的bian,方法包括:默认构造方法、为bian指定初值的构造方法、获取三角形面积findArea()。试利用方法覆盖的知识,设计三棱柱体类TriCylinder。(其中findArea()为计算三棱柱体的表面积)-Equilateral triangle on a class Trival below, which properties include triangles bian, the method comprising: a default constructor, the initial value is specified constructor bian, get the triangle area findArea (). Try using the method of covering knowledge, triangular prism design class TriCylinder. (Wherein findArea () to calculate the surface area of the triangular prism) Platform: |
Size: 1024 |
Author:李佳 |
Hits: