- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCustomer.java
More file actions
Latest commit
45 lines (37 loc) · 991 Bytes
/
Copy pathCustomer.java
File metadata and controls
45 lines (37 loc) · 991 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
44
45
publicclassCustomer
{
privateStringfirstName;
privateStringlastName;
privateintage;
privateStringmobilePhone;
publicCustomer() {
this.firstName = "";
this.lastName = "";
// this.firstName = "Unknown";
// this.lastName = "Unknown";
this.age = 0;
this.mobilePhone = "";
}
publicCustomer(StringfirstName, StringlastName, intage, StringmobilePhone) {
this.firstName = firstName;
this.lastName = lastName;
this.age = age;
this.mobilePhone = mobilePhone;
}
publicStringgetFirstName() {
returnfirstName;
}
publicStringgetLastName() {
returnlastName;
}
publicintgetAge() {
returnage;
}
publicStringgetMobilePhone() {
returnmobilePhone;
}
@Override
publicStringtoString() {
returnfirstName + " " + lastName + " Age:" + age + " Mobile Phone:" + mobilePhone;
}
}