forked from oleksandr-kazimirov/pointer-rectangle
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrectangle
More file actions
33 lines (23 loc) · 656 Bytes
/
Copy pathrectangle
File metadata and controls
33 lines (23 loc) · 656 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
public class Rectangle {
public int lenght=6;
public int width=7;
public int square;
public int i;
private int perimeter;
public Rectangle() {
}
public Rectangle(int lenght, int width,int square, int perimeter) {
this.lenght = lenght;
this.width = width;
this.square = square;
this.perimeter = perimeter;
}
public void square(int i,int i1) {
square= lenght*width;
System.out.println(square+" "+"Square");
}
public void perimeter(int i,int i1) {
perimeter= (lenght+width)*2;
System.out.println(perimeter + " " + "Perimeter");
}
}