文件名称:Class-definition
介绍说明--下载内容均来自于网络,请自行研究使用
写一个名为Rectangle的类表示矩形。属性为宽width、高height和颜色color,widthhe height是double型的,color是String型的。假定所有矩形颜色相同,用一个类变量(类属性)表示颜色。要求提供访问器方法和计算矩形面积的findArea()方法。
写一个用户程序测试Rectangle类:创建两个Rectangle对象。给两个对象设置任意的宽和高。设矩形颜色为黄色。显示两个对象的属性并求面积。
-Write a rectangle representing a class named Rectangle. Property wide width, height and color of high color, widthhe height is double type, color type is String. Assume the same color all the rectangles representing the color variable with a class (class attribute). We requested access methods and calculation area of a rectangle findArea () method. Write a program to test user Rectangle class: create two Rectangle objects. Two objects to set any width and height. Let rectangle color is yellow. Two display object' s properties and find the area.
写一个用户程序测试Rectangle类:创建两个Rectangle对象。给两个对象设置任意的宽和高。设矩形颜色为黄色。显示两个对象的属性并求面积。
-Write a rectangle representing a class named Rectangle. Property wide width, height and color of high color, widthhe height is double type, color type is String. Assume the same color all the rectangles representing the color variable with a class (class attribute). We requested access methods and calculation area of a rectangle findArea () method. Write a program to test user Rectangle class: create two Rectangle objects. Two objects to set any width and height. Let rectangle color is yellow. Two display object' s properties and find the area.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
Class definition.txt