-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSuno.java
More file actions
64 lines (52 loc) · 1.43 KB
/
Suno.java
File metadata and controls
64 lines (52 loc) · 1.43 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
59
60
61
62
63
64
import java.util.Objects;
public class Suno {
private String name;
private int age;
private String birthDate;
public Suno(String name, int age, String birthDate) {
this.name = name;
this.age = age;
this.birthDate = birthDate;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public int getAge() {
return age;
}
public void setAge(int age) {
this.age = age;
}
public String getBirthDate() {
return birthDate;
}
public void setBirthDate(String birthDate) {
this.birthDate = birthDate;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
Suno suno = (Suno) o;
return age == suno.age && Objects.equals(name, suno.name) && Objects.equals(birthDate, suno.birthDate);
}
@Override
public int hashCode() {
return Objects.hash(name, age, birthDate);
}
@Override
public String toString() {
return "Suno{" +
"name='" + name + '\'' +
", age=" + age +
", birthDate='" + birthDate + '\'' +
'}';
}
// public static void main(String[] args) {
// Suno suno = new Suno("권순호",26,"0509");
// System.out.println(suno);
// }
}