文件名称: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
1999-2046 搜珍网 All Rights Reserved.
本站作为网络服务提供者,仅为网络服务对象提供信息存储空间,仅对用户上载内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。
