-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathShamsTheHuman.java
More file actions
33 lines (26 loc) · 882 Bytes
/
ShamsTheHuman.java
File metadata and controls
33 lines (26 loc) · 882 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
package hw4;
// Test Subject
public class ShamsTheHuman extends HairColor { // Hierarchy inheritance
public static void main(String[] args) {
Human.nature();
AllBodyParts Shams = new AllBodyParts(); //Constructor
Shams.AllBodyParts(2); // Method
Shams.AllBodyParts(2, 3);
AllBodyParts ChikniShams = new AllBodyParts(2);
Shams.AllBodyParts(2.5, 2);
ChikniShams.tail();
ShamsTheHuman ShamsJr = new ShamsTheHuman();
ShamsJr.displaySP();
ShamsJr.HairColor();
ShamsJr.HairColor("Black");
ShamsJr.setSP("mouse"); //data hiding
System.out.println("My Super Power is " + ShamsJr.getSP() +" "+ ShamsJr.behaviour);
}
public void HairColor() {
System.out.println("hair color void");
}
public String HairColor(String color) {
System.out.println("hair color return " + color );
return color;
}
}