forked from DavidsonCodes/Java_Sample_Codes
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathEmmanuel.java
More file actions
91 lines (67 loc) · 2.04 KB
/
Copy pathEmmanuel.java
File metadata and controls
91 lines (67 loc) · 2.04 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
package Online_Code_Samples.Week1;
public class Emmanuel {
private String firstName;
private String lastName;
private String fullName;
private int age;
private String email;
private static int count = 0;
public Emmanuel(String firstName, String lastName, int age, String email) {
this.firstName = firstName;
this.lastName = lastName;
this.age = age;
this.email = email;
this.fullName = firstName + " " + lastName;
count++;
}
public Emmanuel(String firstName, String lastName, String email){
this(firstName, lastName, 35, email);
}
public Emmanuel(String firstName, String lastName){
}
public String getFirstName() {
return firstName;
}
public void setFirstName(String firstName) {
this.firstName = firstName;
}
public String getLastName() {
return lastName;
}
public void setLastName(String lastName) {
this.lastName = lastName;
}
public String getFullName() {
return fullName;
}
public void setFullName(String fullName) {
this.fullName = fullName;
}
public int getAge() {
return age;
}
public void setAge(int age) {
this.age = age;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public static int getCount() {
return count;
}
public static void main(String[] args) {
Emmanuel firstAEmmanuel = new Emmanuel("Firstname", "Lastname");
System.out.println(firstEmmanuel.getFirstName());
System.out.println(firstEmmanuel.getAge());
firstEmmanuel.setAge(65);
System.out.println(firstEmmanuel.getAge());
System.out.println(firstEmmanuel.getFullName());
System.out.println(Emmanuel.count);
System.out.println(getCount());
}
}