-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathElectronics.java
More file actions
40 lines (33 loc) · 1.16 KB
/
Copy pathElectronics.java
File metadata and controls
40 lines (33 loc) · 1.16 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
public class Electronics extends Product implements java.io.Serializable
{
private String brandName;
private int warrantyPeriod;
public Electronics(String productID,String productName,int noOfAvailableItem,double price,String brandName,int warrantyPeriod)
{
super(productID,productName,noOfAvailableItem,price);
this.brandName=brandName;
this.warrantyPeriod=warrantyPeriod;
}
public String getBrandName() {
return brandName;
}
public void setBrandName(String brandName) {
this.brandName = brandName;
}
public int getWarrantyPeriod() {
return warrantyPeriod;
}
public void setWarrantyPeriod(int warrantyPeriod) {
this.warrantyPeriod = warrantyPeriod;
}
@Override
public String toString() {
return "-----Electronics------" +"\n"+
"productID= " + productID +"\n"+
"productName= " + productName + "\n" +
"noOfAvailableItem= " + noOfAvailableItem +"\n" +
"price= " + price +"\n" +
"brandName= " + brandName +"\n" +
"warrantyPeriod= " + warrantyPeriod ;
}
}