Write a class named Rectangle to represent rectangles.it has member attributes width:int and height:int.please provide the setter and getter of those members, and design a method named area to calculate its area.
编写一个类名为矩形代表rectangles.it的成员属性width:int和高度:int.please提供setter和getter那些成员,设计名为面积的方法来计算其面积。
新手,所以请大神们用简单点的方式解答,多谢!
等楼下的给你解答吧
居然没人回答你,看下面