-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathspecial_product.java
More file actions
52 lines (37 loc) · 1.21 KB
/
Copy pathspecial_product.java
File metadata and controls
52 lines (37 loc) · 1.21 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
41
42
43
44
45
46
47
48
49
50
51
52
package project.pkg151;
import java.util.ArrayList;
public final class special_product extends products{
private String ReleationShip ;
private int size;
private special_product arraySP[];
public special_product( String name,double cost , String t , int size) {
super(name, cost);
ReleationShip=t;
arraySP=new special_product[size];
}
public special_product(String name ,double cost) {
super(name, cost);
}
//default constructor
public special_product() {
}
public void setSize(int size) {
this.size = size;
}
public int getSize() {
return size;
}
public String getReleationShip() {
return ReleationShip;
}
public void setReleationShip(String ReleationShip) {
this.ReleationShip = ReleationShip;
}
public special_product[] getArraySP() {
return arraySP;
}
@Override
public String toString() {
return "special_product{ " +"With ID number"+ " ("+returnID()+" ) Products ( " + "name: " + getName() + ", price: " + returnPrice() + " SR )";
}
}