-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathNecklace.java
More file actions
73 lines (62 loc) · 2.04 KB
/
Copy pathNecklace.java
File metadata and controls
73 lines (62 loc) · 2.04 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
/** C23727729 Khalid Roble**/
/** 2 Create Subclass Necklace */
public class Necklace extends Jewellery
{
private String shapeOfNeck;
private String typeOfNeck;
private double sizeOfNeck;
/**2.1 Create standard operations. */
public Necklace()
{
super();
this.shapeOfNeck = "";
this.typeOfNeck = "";
this.sizeOfNeck = 0.0;
}
public Necklace(double price,int quantity, String name,String brand, String colour, boolean measure_clarity,String shapeOfNeck, String typeOfNeck, double sizeOfNeck)
{
super(price, quantity, name, brand, colour, measure_clarity);
this.shapeOfNeck = shapeOfNeck;
this.typeOfNeck = typeOfNeck;
this.sizeOfNeck = sizeOfNeck;
}
public Necklace(double price,int quantity, String name,String brand, String colour,String shapeOfNeck, String typeOfNeck, double sizeOfNeck)
{
super(price, quantity, name, brand, colour);
this.shapeOfNeck = shapeOfNeck;
this.typeOfNeck = typeOfNeck;
this.sizeOfNeck = sizeOfNeck;
}
public String getShapeOfNeck()
{
return this.shapeOfNeck;
}
public String getTypeOfNeck()
{
return this.typeOfNeck;
}
public double getSizeOfNeck()
{
return this.sizeOfNeck;
}
public void setShapeOfNeck(String shapeOfNeck)
{
this.shapeOfNeck = shapeOfNeck;
}
public void setTypeOfNeck(String typeOfNeck)
{
this.typeOfNeck = typeOfNeck;
}
public void setSizeOfNeck(double sizeOfNeck)
{
this.sizeOfNeck = sizeOfNeck;
}
public String toString()
{
return "-----------------------------------------------------"+ "\n"+
"Necklace: "+ "\n\n" + super.toString()+
" The shape of the Necklace is : "+this.shapeOfNeck+ "\n\n"+
" The type of the Necklace is : "+this.typeOfNeck+ "\n\n"+
" The size of the Necklace is : "+this.sizeOfNeck+ " cm"+"\n\n";
}
}