Advertisement
Advertisement

新足迹

 找回密码
 注册
新足迹 门户 工作学习 查看内容

分享面试题, 有请java高手

2006-9-28 17:46| 发布者: a711012 | 查看: 1240| 原文链接

请看一下

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."

什么意思啊? 又不是日期类型, 要特别的检查?
Advertisement
Advertisement


Advertisement
Advertisement
返回顶部