forked from ab-rohman/Open-Hack2021
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSepedaMain.java
More file actions
29 lines (26 loc) · 775 Bytes
/
Copy pathSepedaMain.java
File metadata and controls
29 lines (26 loc) · 775 Bytes
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
/**
*
* @author Rizqi Ardiansyah
*/
public class SepedaMain {
public static void main(String[]args){
Sepeda spd1 = new Sepeda();
Sepeda spd2 = new Sepeda();
SepedaGunung spd3 = new SepedaGunung();
spd1.setMerek("United");
spd1.tambahKecepatan(10);
spd1.gantiGear(2);
spd1.cetakStatus();
spd2.setMerek("Pacific");
spd2.tambahKecepatan(10);
spd2.gantiGear(2);
spd2.tambahKecepatan(10);
spd2.gantiGear(3);
spd2.cetakStatus();
spd3.setMerek("Rocky Mountain");
spd3.tambahKecepatan(5);
spd3.gantiGear(7);
spd3.setTipeSuspensi("Gas suspension");
spd3.cetakStatus();
}
}