-
Notifications
You must be signed in to change notification settings - Fork 49
Expand file tree
/
Copy pathPerson.java
More file actions
58 lines (44 loc) · 1.03 KB
/
Person.java
File metadata and controls
58 lines (44 loc) · 1.03 KB
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
52
53
54
55
56
57
58
package com.zipcodewilmington.person;
/**
* Created by leon on 2/12/18.
*/
public class Person {
private String name;
private int age;
// private int birthYear;
// private int numberOfSiblings;
// private String hairColor;
// private String eyeColor;
// private String favoriteColor;
public Person() {
this.name = "";
this.age = Integer.MAX_VALUE;
// this.birthYear = Integer.MAX_VALUE;
// this.numberOfSiblings = Integer.MAX_VALUE;
// this.hairColor = "";
// this.eyeColor = "";
// this.favoriteColor = "";
}
public Person(int age) {
this.age = age;
}
public Person(String name) {
this.name = name;
}
public Person(String name, int age) {
this.name = name;
this.age = age;
}
public void setName(String name) {
this.name = name;
}
public void setAge(int age) {
this.age = age;
}
public String getName() {
return name;
}
public Integer getAge() {
return age;
}
}