-
Notifications
You must be signed in to change notification settings - Fork 17
Expand file tree
/
Copy pathHuman.java
More file actions
44 lines (29 loc) · 867 Bytes
/
Human.java
File metadata and controls
44 lines (29 loc) · 867 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
/**
* Created by prestonbattin on 1/18/17.
*/
public class Human {
protected String name, gender, occupation, address;
protected int age;
Human(String name, String gender, String occupation, String address, int age){
this.name = name;
this.gender = gender;
this.occupation = occupation;
this.address = address;
this.age = age;
}
protected void getName(){
System.out.println("Your name is " + name);
}
protected void getGender(){
System.out.println("You are " + gender);
}
protected void getOccupation(){
System.out.println("Your occupation is " + occupation);
}
protected void getAddress(){
System.out.println("Your address is " + address);
}
protected void getAge(){
System.out.println("Your age is " + age);
}
}