-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathCDBuilder.java
More file actions
61 lines (53 loc) · 1.84 KB
/
CDBuilder.java
File metadata and controls
61 lines (53 loc) · 1.84 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
public class CDBuilder {
//Menginisialisasi objec CDType
public CDType buildHondaCD(){
CDType cds=new CDType();
cds.addItem(new Honda());
return cds;
}
public CDType buildMitsubishiCD(){
CDType cds=new CDType();
cds.addItem(new Mitsubishi());
return cds;
}
public CDType buildHyundaiCD(){
CDType cds=new CDType();
cds.addItem(new Hyundai());
return cds;
}
public CDType buildToyotaCD(){
CDType cds=new CDType();
cds.addItem(new Toyota());
return cds;
}
public CDType buildDaihatsuCD(){
CDType cds=new CDType();
cds.addItem(new Daihatsu());
return cds;
}
public CDType buildWulingCD(){
CDType cds=new CDType();
cds.addItem(new Wuling());
return cds;
}
public CDType buildMercedesCD(){
CDType cds=new CDType();
cds.addItem(new Mercedes());
return cds;
}
public CDType buildFerrariCD(){
CDType cds=new CDType();
cds.addItem(new Ferrari());
return cds;
}
public CDType buildAudiCD(){
CDType cds=new CDType();
cds.addItem(new Audi());
return cds;
}
public CDType buildMiniCooperCD(){
CDType cds=new CDType();
cds.addItem(new MiniCooper());
return cds;
}
}// End of the CDBuilder class.