-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCustomer.java
45 lines (37 loc) · 991 Bytes
/
Customer.java
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
public class Customer
{
private String firstName;
private String lastName;
private int age;
private String mobilePhone;
public Customer() {
this.firstName = "";
this.lastName = "";
// this.firstName = "Unknown";
// this.lastName = "Unknown";
this.age = 0;
this.mobilePhone = "";
}
public Customer(String firstName, String lastName, int age, String mobilePhone) {
this.firstName = firstName;
this.lastName = lastName;
this.age = age;
this.mobilePhone = mobilePhone;
}
public String getFirstName() {
return firstName;
}
public String getLastName() {
return lastName;
}
public int getAge() {
return age;
}
public String getMobilePhone() {
return mobilePhone;
}
@Override
public String toString() {
return firstName + " " + lastName + " Age:" + age + " Mobile Phone:" + mobilePhone;
}
}