我们要来定义一个带有带有高和宽的矩形,并且要提供一个计算其面积的area方法。
We want to write a class Rectangle, which has width and height as its data and a method area that computes the area.
这辆“宝马”车长五米,宽2.15米,高1.6米,足足6.5吨重,由红砖、水泥、钢铁做成,60万元的造价,堪比宝马。
The brick car is 5 meters long, 2.15 meters wide, 1.6 meters high and weighs 6.5 tons. The car, made of red bricks, cement and steel, cost 600,000 yuan, which is the same price as a BMW.
整幅画高1.83米,宽3.05米,以木板为底,画面全部用当地盛产的玉米、黄豆、荞麦等20多种杂粮拼贴。
The picture, 1.83m high and 3.05m wide, is made on a wooden block with over 20 kinds of local grain stuck on it, including corn, soy bean and buckwheat.(See photo)
This is both 3 m across, and about 6 m tall.
m宽,6m高。
应用推荐