summaryrefslogtreecommitdiff
path: root/oop/09-polymorphism/PremiumCustomer.java
diff options
context:
space:
mode:
authorKamal Wickramanayake <kamal@inbox.lk>2026-02-21 19:56:23 +0530
committerKamal Wickramanayake <kamal@inbox.lk>2026-02-21 19:56:23 +0530
commitfab39307b045215fb465701009bb0d454788a4ca (patch)
treebe32da2848f862827b5c3552a3b60c32389fa35e /oop/09-polymorphism/PremiumCustomer.java
parentf0a5509cc57cbd6fc95728fb8566ce011d34cebd (diff)
Added simple OOP sample code.
Diffstat (limited to 'oop/09-polymorphism/PremiumCustomer.java')
-rw-r--r--oop/09-polymorphism/PremiumCustomer.java43
1 files changed, 43 insertions, 0 deletions
diff --git a/oop/09-polymorphism/PremiumCustomer.java b/oop/09-polymorphism/PremiumCustomer.java
new file mode 100644
index 0000000..a098af5
--- /dev/null
+++ b/oop/09-polymorphism/PremiumCustomer.java
@@ -0,0 +1,43 @@
+public class PremiumCustomer extends Customer {
+
+ private String category;
+ private String desction;
+
+
+ public PremiumCustomer() {
+ }
+
+ public PremiumCustomer(int customerNumber, String name, String address,
+ String phone, String mobile) {
+ super(customerNumber, name, address, phone, mobile);
+ }
+
+
+ public PremiumCustomer(int customerNumber, String name, String address,
+ String phone, String mobile, String category, String desction) {
+ super(customerNumber, name, address, phone, mobile);
+ this.category = category;
+ this.desction = desction;
+ }
+
+ public PremiumCustomer(String category, String desction) {
+ super();
+ this.category = category;
+ this.desction = desction;
+ }
+
+ public String getCategory() {
+ return category;
+ }
+ public void setCategory(String category) {
+ this.category = category;
+ }
+ public String getDesction() {
+ return desction;
+ }
+ public void setDesction(String desction) {
+ this.desction = desction;
+ }
+
+
+}