-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathClassified.java
More file actions
51 lines (38 loc) · 892 Bytes
/
Classified.java
File metadata and controls
51 lines (38 loc) · 892 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
46
47
48
49
50
51
package hw4;
public class Classified { //encapsulation
private String superPower;
private int wing = 00;
private char Black;
private char Brown;
public String behaviour = "Adob lehaj gese";
public String getSP() {
return superPower;
}
public void setSP(String superPower) {
this.superPower = superPower;
}
public int getWing() {
return wing;
}
public void setWing(int wing) {
this.wing = wing;
}
public char getB() {
return Black;
}
public void setB(char b) {
Black = b;
}
public char getBr() {
return Brown;
}
public void setBr(char br) {
Brown = br;
}
private void disableingSP() { //private method cannot accessible into other class
System.out.println("No Superpower");
}
public void displaySP() { //giving an access to a private method to public
disableingSP();
}
}