-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathGeometry.java
More file actions
45 lines (35 loc) · 961 Bytes
/
Geometry.java
File metadata and controls
45 lines (35 loc) · 961 Bytes
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
package com.dtcc.exams.part4;
public class Geometry implements Rectangle, Circle {
private int height;
private int width;
private int radius;
@Override
public int area(int height, int width) {
return 0;
}
@Override
public double area(int radius) {
return 0;
}
public Geometry(){}
public int getHeight() {
return height;
}
public int getWidth() {
return width;
}
public int getRadius() {
return radius;
}
public Geometry(int height, int width, int radius) {
this.height = height;
this.width = width;
this.radius = radius;
}
public int getArea(int height, int width){
return height * width;
}
public double getArea(int radius){
return 3.14 *(radius * radius);
}
}