diff options
| author | Kamal Wickramanayake <kamal@inbox.lk> | 2026-02-21 19:56:23 +0530 |
|---|---|---|
| committer | Kamal Wickramanayake <kamal@inbox.lk> | 2026-02-21 19:56:23 +0530 |
| commit | fab39307b045215fb465701009bb0d454788a4ca (patch) | |
| tree | be32da2848f862827b5c3552a3b60c32389fa35e /oop/09-polymorphism/Customer.java | |
| parent | f0a5509cc57cbd6fc95728fb8566ce011d34cebd (diff) | |
Added simple OOP sample code.
Diffstat (limited to 'oop/09-polymorphism/Customer.java')
| -rw-r--r-- | oop/09-polymorphism/Customer.java | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/oop/09-polymorphism/Customer.java b/oop/09-polymorphism/Customer.java new file mode 100644 index 0000000..56b0f7b --- /dev/null +++ b/oop/09-polymorphism/Customer.java @@ -0,0 +1,60 @@ +public class Customer { + private int customerNumber; + private String name; + private String address; + private String phone; + private String mobile; + + public Customer() { + } + + public Customer(int customerNumber, String name, String address, + String phone, String mobile) { + this.customerNumber = customerNumber; + this.name = name; + this.address = address; + this.phone = phone; + this.mobile = mobile; + } + + public int getCustomerNumber() { + return customerNumber; + } + + public void setCustomerNumber(int customerNumber) { + this.customerNumber = customerNumber; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getAddress() { + return address; + } + + public void setAddress(String address) { + this.address = address; + } + + public String getPhone() { + return phone; + } + + public void setPhone(String phone) { + this.phone = phone; + } + + public String getMobile() { + return mobile; + } + + public void setMobile(String mobile) { + this.mobile = mobile; + } + +} |
