-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCicrcleIn.java
More file actions
65 lines (48 loc) · 1.11 KB
/
CicrcleIn.java
File metadata and controls
65 lines (48 loc) · 1.11 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
package com.mycompany.box;
public class CicrcleIn {
private double radius ;
String color ;
public static int count = 0;
public CicrcleIn() {
this.radius = 1.0;
this.color = "red";
}
/**
*
* @param radius
* @param color
*/
public CicrcleIn(double radius , String color)
{
this.radius = radius;
this.color = color;
}
public double getRadius() {
return radius;
}
public void setRadius(double radius) {
this.radius = radius;
}
public String getColor() {
return color;
}
public void setColor(String color) {
this.color = color;
}
public double getArea()
{
return radius* radius* Math.PI;
}
@Override
public String toString()
{
return "the are is +circleIn.getArea " ;
}
public boolean isEqual(CicrcleIn obj)
{
if(this.radius == obj.radius)
return true;
else
return false;
}
}