-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathRectangle.java
More file actions
executable file
·50 lines (48 loc) · 1.21 KB
/
Rectangle.java
File metadata and controls
executable file
·50 lines (48 loc) · 1.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
/* */ package ch13;
/* */
/* */ public class Rectangle
/* */ extends GeometricObject {
/* */ private double width;
/* */ private double height;
/* */
/* */ public Rectangle() {}
/* */
/* */ public Rectangle(double width, double height) {
/* 11 */ this.width = width;
/* 12 */ this.height = height;
/* */ }
/* */
/* */
/* */ public double getWidth() {
/* 17 */ return this.width;
/* */ }
/* */
/* */
/* */ public void setWidth(double width) {
/* 22 */ this.width = width;
/* */ }
/* */
/* */
/* */ public double getHeight() {
/* 27 */ return this.height;
/* */ }
/* */
/* */
/* */ public void setHeight(double height) {
/* 32 */ this.height = height;
/* */ }
/* */
/* */
/* */ public double getArea() {
/* 37 */ return this.width * this.height;
/* */ }
/* */
/* */
/* */ public double getPerimeter() {
/* 42 */ return 2.0D * (this.width + this.height);
/* */ }
/* */ }
/* Location: /Volumes/TXS.128G/hope useful/practice/2020.jar!/ch13/Rectangle.class
* Java compiler version: 8 (52.0)
* JD-Core Version: 1.1.3
*/