|
2 | 2 | import java.util.List; |
3 | 3 |
|
4 | 4 | public class Student { |
5 | | - private long studentNumber; |
6 | | - private String fullName; |
7 | | - private Department department; |
8 | | - private String emailAddress; |
9 | | - private List<String> phoneNumbers; |
10 | | - private LocalDate dateOfBirth; |
| 5 | + private long studentNumber; |
| 6 | + private String fullName; |
| 7 | + private Department department; |
| 8 | + private String emailAddress; |
| 9 | + private List<String> phoneNumbers; |
| 10 | + private LocalDate dateOfBirth; |
11 | 11 |
|
12 | | - public Student(long studentNumber, String fullName, Department department, String emailAddress, List<String> phoneNumbers, LocalDate dateOfBirth) { |
13 | | - this.studentNumber = studentNumber; |
14 | | - this.fullName = fullName; |
15 | | - this.department = department; |
16 | | - this.emailAddress = emailAddress; |
17 | | - this.phoneNumbers = phoneNumbers; |
18 | | - this.dateOfBirth = dateOfBirth; |
19 | | - } |
| 12 | + public Student( |
| 13 | + long studentNumber, |
| 14 | + String fullName, |
| 15 | + Department department, |
| 16 | + String emailAddress, |
| 17 | + List<String> phoneNumbers, |
| 18 | + LocalDate dateOfBirth) { |
| 19 | + this.studentNumber = studentNumber; |
| 20 | + this.fullName = fullName; |
| 21 | + this.department = department; |
| 22 | + this.emailAddress = emailAddress; |
| 23 | + this.phoneNumbers = phoneNumbers; |
| 24 | + this.dateOfBirth = dateOfBirth; |
| 25 | + } |
20 | 26 |
|
21 | | - public long getStudentNumber() { |
22 | | - return studentNumber; |
23 | | - } |
| 27 | + public long getStudentNumber() { |
| 28 | + return studentNumber; |
| 29 | + } |
24 | 30 |
|
25 | | - public void setStudentNumber(long studentNumber) { |
26 | | - this.studentNumber = studentNumber; |
27 | | - } |
| 31 | + public void setStudentNumber(long studentNumber) { |
| 32 | + this.studentNumber = studentNumber; |
| 33 | + } |
28 | 34 |
|
29 | | - public String getFullName() { |
30 | | - return fullName; |
31 | | - } |
| 35 | + public String getFullName() { |
| 36 | + return fullName; |
| 37 | + } |
32 | 38 |
|
33 | | - public void setFullName(String fullName) { |
34 | | - this.fullName = fullName; |
35 | | - } |
| 39 | + public void setFullName(String fullName) { |
| 40 | + this.fullName = fullName; |
| 41 | + } |
36 | 42 |
|
37 | | - public Department getDepartment() { |
38 | | - return department; |
39 | | - } |
| 43 | + public Department getDepartment() { |
| 44 | + return department; |
| 45 | + } |
40 | 46 |
|
41 | | - public void setDepartment(Department department) { |
42 | | - this.department = department; |
43 | | - } |
| 47 | + public void setDepartment(Department department) { |
| 48 | + this.department = department; |
| 49 | + } |
44 | 50 |
|
45 | | - public String getEmailAddress() { |
46 | | - return emailAddress; |
47 | | - } |
| 51 | + public String getEmailAddress() { |
| 52 | + return emailAddress; |
| 53 | + } |
48 | 54 |
|
49 | | - public void setEmailAddress(String emailAddress) { |
50 | | - this.emailAddress = emailAddress; |
51 | | - } |
| 55 | + public void setEmailAddress(String emailAddress) { |
| 56 | + this.emailAddress = emailAddress; |
| 57 | + } |
52 | 58 |
|
53 | | - public List<String> getPhoneNumbers() { |
54 | | - return phoneNumbers; |
55 | | - } |
| 59 | + public List<String> getPhoneNumbers() { |
| 60 | + return phoneNumbers; |
| 61 | + } |
56 | 62 |
|
57 | | - public void setPhoneNumbers(List<String> phoneNumbers) { |
58 | | - this.phoneNumbers = phoneNumbers; |
59 | | - } |
| 63 | + public void setPhoneNumbers(List<String> phoneNumbers) { |
| 64 | + this.phoneNumbers = phoneNumbers; |
| 65 | + } |
60 | 66 |
|
61 | | - public LocalDate getDateOfBirth() { |
62 | | - return dateOfBirth; |
63 | | - } |
| 67 | + public LocalDate getDateOfBirth() { |
| 68 | + return dateOfBirth; |
| 69 | + } |
64 | 70 |
|
65 | | - public void setDateOfBirth(LocalDate dateOfBirth) { |
66 | | - this.dateOfBirth = dateOfBirth; |
67 | | - } |
| 71 | + public void setDateOfBirth(LocalDate dateOfBirth) { |
| 72 | + this.dateOfBirth = dateOfBirth; |
| 73 | + } |
68 | 74 |
|
69 | | - @Override |
70 | | - public String toString() { |
71 | | - return "Student{" + |
72 | | - "studentNumber=" + studentNumber + |
73 | | - ", fullName='" + fullName + '\'' + |
74 | | - ", department=" + department + |
75 | | - ", emailAddress='" + emailAddress + '\'' + |
76 | | - ", phoneNumbers=" + phoneNumbers + |
77 | | - ", dateOfBirth=" + dateOfBirth + |
78 | | - '}'; |
79 | | - } |
| 75 | + @Override |
| 76 | + public String toString() { |
| 77 | + return "Student{" |
| 78 | + + "studentNumber=" |
| 79 | + + studentNumber |
| 80 | + + ", fullName='" |
| 81 | + + fullName |
| 82 | + + '\'' |
| 83 | + + ", department=" |
| 84 | + + department |
| 85 | + + ", emailAddress='" |
| 86 | + + emailAddress |
| 87 | + + '\'' |
| 88 | + + ", phoneNumbers=" |
| 89 | + + phoneNumbers |
| 90 | + + ", dateOfBirth=" |
| 91 | + + dateOfBirth |
| 92 | + + '}'; |
| 93 | + } |
80 | 94 | } |
0 commit comments