- Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathClassified.java
More file actions
Latest commit
51 lines (38 loc) · 892 Bytes
/
Copy pathClassified.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
packagehw4;
publicclassClassified { //encapsulation
privateStringsuperPower;
privateintwing = 00;
privatecharBlack;
privatecharBrown;
publicStringbehaviour = "Adob lehaj gese";
publicStringgetSP() {
returnsuperPower;
}
publicvoidsetSP(StringsuperPower) {
this.superPower = superPower;
}
publicintgetWing() {
returnwing;
}
publicvoidsetWing(intwing) {
this.wing = wing;
}
publicchargetB() {
returnBlack;
}
publicvoidsetB(charb) {
Black = b;
}
publicchargetBr() {
returnBrown;
}
publicvoidsetBr(charbr) {
Brown = br;
}
privatevoiddisableingSP() { //private method cannot accessible into other class
System.out.println("No Superpower");
}
publicvoiddisplaySP() { //giving an access to a private method to public
disableingSP();
}
}