|
|
此文章由 a711012 原创或转贴,不代表本站立场和观点,版权归 oursteps.com.au 和作者 a711012 所有!转贴必须注明作者、出处和本声明,并保持内容完整
请看一下
Shapes
A mathematical application has the following requirements:
1. The application must be able to define the following shapes:
- Square
- Rectangle
- Circle
- RightAngleTriangle
2. Each shape is to be defined using the minimum number of measurements necessary according to the size and type of shape.
3. All measurements shall be expressed in centimetres.
4. For each shape the application must be able to answer the following information:
- the area of the shape
- the total distance around the edge(s) of the shape
- the number of sides the shape has
- other attributes that are applicable depending on the type of shape (e.g. a Circle has a diameter)
Design and implement the classes necessary to support this application.
就是考java基本的class设计, 唯一不明白的是"All measurements shall be expressed in centimetres."
什么意思啊? 又不是日期类型, 要特别的检查? |
|