-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBajuKurung.java
More file actions
45 lines (42 loc) · 1.01 KB
/
Copy pathBajuKurung.java
File metadata and controls
45 lines (42 loc) · 1.01 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
public class BajuKurung extends TailOrder {
private int type;
private boolean embroidery;
public BajuKurung(String c, String o, double d, boolean de, int t, boolean e) {
super(c,o,d,de);
type=t;
embroidery=e;
}
public double AddEmbroidery() {
if(embroidery==true)
return 25.0;
else
return 0.0;
}
public double payment() {
double price=0;
switch(type) {
case 1:
{
price=30.00;
break;
}
case 2:
{
price=60.00;
break;
}
case 3:
{
price=55.00;
break;
}
case 4:
{
price=110.0;
break;
}
default: System.out.println("\nERROR : Unknown Input");
}
return price+AddEmbroidery();
}
}