From 45b8f6a1f4ece0eb61a6ac214b078ba2d2bf19f4 Mon Sep 17 00:00:00 2001 From: zidanshabira Date: Wed, 18 Nov 2020 20:44:37 +0700 Subject: [PATCH] JS11_Zidan Shabira As Sidiq_1941720144 --- PBO_Jobsheet10_1941720144/pom.xml | 14 +++++++ .../java/interfacelatihan/IBerprestasi.java | 15 +++++++ .../main/java/interfacelatihan/ICumlaude.java | 16 ++++++++ .../main/java/interfacelatihan/Mahasiswa.java | 23 +++++++++++ .../MultipleInterfaceMain.java | 26 ++++++++++++ .../java/interfacelatihan/PascaSarjana.java | 36 +++++++++++++++++ .../main/java/interfacelatihan/Rektor.java | 34 ++++++++++++++++ .../main/java/interfacelatihan/Sarjana.java | 27 +++++++++++++ .../java/interfacelatihan/interfacemain.java | 29 +++++++++++++ .../src/main/java/tugas.rar | Bin 0 -> 2938 bytes .../src/main/java/tugas/Binatang.java | 38 ++++++++++++++++++ .../src/main/java/tugas/Gorilla.java | 37 +++++++++++++++++ .../src/main/java/tugas/IHerbivora.java | 14 +++++++ .../src/main/java/tugas/IKarnivora.java | 14 +++++++ .../src/main/java/tugas/Keledai.java | 37 +++++++++++++++++ .../src/main/java/tugas/Main.java | 31 ++++++++++++++ .../src/main/java/tugas/Singa.java | 37 +++++++++++++++++ 17 files changed, 428 insertions(+) create mode 100644 PBO_Jobsheet10_1941720144/pom.xml create mode 100644 PBO_Jobsheet10_1941720144/src/main/java/interfacelatihan/IBerprestasi.java create mode 100644 PBO_Jobsheet10_1941720144/src/main/java/interfacelatihan/ICumlaude.java create mode 100644 PBO_Jobsheet10_1941720144/src/main/java/interfacelatihan/Mahasiswa.java create mode 100644 PBO_Jobsheet10_1941720144/src/main/java/interfacelatihan/MultipleInterfaceMain.java create mode 100644 PBO_Jobsheet10_1941720144/src/main/java/interfacelatihan/PascaSarjana.java create mode 100644 PBO_Jobsheet10_1941720144/src/main/java/interfacelatihan/Rektor.java create mode 100644 PBO_Jobsheet10_1941720144/src/main/java/interfacelatihan/Sarjana.java create mode 100644 PBO_Jobsheet10_1941720144/src/main/java/interfacelatihan/interfacemain.java create mode 100644 PBO_Jobsheet10_1941720144/src/main/java/tugas.rar create mode 100644 PBO_Jobsheet10_1941720144/src/main/java/tugas/Binatang.java create mode 100644 PBO_Jobsheet10_1941720144/src/main/java/tugas/Gorilla.java create mode 100644 PBO_Jobsheet10_1941720144/src/main/java/tugas/IHerbivora.java create mode 100644 PBO_Jobsheet10_1941720144/src/main/java/tugas/IKarnivora.java create mode 100644 PBO_Jobsheet10_1941720144/src/main/java/tugas/Keledai.java create mode 100644 PBO_Jobsheet10_1941720144/src/main/java/tugas/Main.java create mode 100644 PBO_Jobsheet10_1941720144/src/main/java/tugas/Singa.java diff --git a/PBO_Jobsheet10_1941720144/pom.xml b/PBO_Jobsheet10_1941720144/pom.xml new file mode 100644 index 0000000..7336549 --- /dev/null +++ b/PBO_Jobsheet10_1941720144/pom.xml @@ -0,0 +1,14 @@ + + + 4.0.0 + com.mycompany + PBO_Jobsheet10_1941720144 + 1.0-SNAPSHOT + jar + + UTF-8 + 13 + 13 + + PBO_Jobsheet11_1941720144 + \ No newline at end of file diff --git a/PBO_Jobsheet10_1941720144/src/main/java/interfacelatihan/IBerprestasi.java b/PBO_Jobsheet10_1941720144/src/main/java/interfacelatihan/IBerprestasi.java new file mode 100644 index 0000000..b55f66d --- /dev/null +++ b/PBO_Jobsheet10_1941720144/src/main/java/interfacelatihan/IBerprestasi.java @@ -0,0 +1,15 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package interfacelatihan; + +/** + * + * @author Zidan + */ +public interface IBerprestasi { + public abstract void menjuaraiKompetisi(); + public abstract void membuatPublikasiIlmiah(); +} diff --git a/PBO_Jobsheet10_1941720144/src/main/java/interfacelatihan/ICumlaude.java b/PBO_Jobsheet10_1941720144/src/main/java/interfacelatihan/ICumlaude.java new file mode 100644 index 0000000..21ff7fa --- /dev/null +++ b/PBO_Jobsheet10_1941720144/src/main/java/interfacelatihan/ICumlaude.java @@ -0,0 +1,16 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package interfacelatihan; + +/** + * + * @author Zidan + */ +public interface ICumlaude { + public abstract void lulus(); + public abstract void meraihIPKTinggi(); + public abstract void kuliahDiKampus(); +} diff --git a/PBO_Jobsheet10_1941720144/src/main/java/interfacelatihan/Mahasiswa.java b/PBO_Jobsheet10_1941720144/src/main/java/interfacelatihan/Mahasiswa.java new file mode 100644 index 0000000..90087a9 --- /dev/null +++ b/PBO_Jobsheet10_1941720144/src/main/java/interfacelatihan/Mahasiswa.java @@ -0,0 +1,23 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package interfacelatihan; + +/** + * + * @author Zidan + */ +public class Mahasiswa { + protected String nama; + + public Mahasiswa(String nama){ + this.nama=nama; + } + + public void kuliahDiKampus(){ + System.out.println("Aku mahasiswa, namaku "+this.nama); + System.out.println("Aku berkuliah di kampus."); + } +} diff --git a/PBO_Jobsheet10_1941720144/src/main/java/interfacelatihan/MultipleInterfaceMain.java b/PBO_Jobsheet10_1941720144/src/main/java/interfacelatihan/MultipleInterfaceMain.java new file mode 100644 index 0000000..753aba6 --- /dev/null +++ b/PBO_Jobsheet10_1941720144/src/main/java/interfacelatihan/MultipleInterfaceMain.java @@ -0,0 +1,26 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package interfacelatihan; +import interfacelatihan.ICumlaude; +import interfacelatihan.Mahasiswa; +import interfacelatihan.PascaSarjana; +import interfacelatihan.Rektor; +import interfacelatihan.Sarjana; +/** + * + * @author Zidan + */ +public class MultipleInterfaceMain { + public static void main(String[] args) { + Rektor pakrektor=new Rektor(); + + Sarjana sarjanaCum=new Sarjana("Dini"); + PascaSarjana masterCum=new PascaSarjana("Elok"); + + //pakrektor.beriSertifikatMAwapres(sarjanaCum); + pakrektor.beriSertifikatMAwapres(masterCum); + } +} diff --git a/PBO_Jobsheet10_1941720144/src/main/java/interfacelatihan/PascaSarjana.java b/PBO_Jobsheet10_1941720144/src/main/java/interfacelatihan/PascaSarjana.java new file mode 100644 index 0000000..e25b93c --- /dev/null +++ b/PBO_Jobsheet10_1941720144/src/main/java/interfacelatihan/PascaSarjana.java @@ -0,0 +1,36 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package interfacelatihan; + +/** + * + * @author Zidan + */ +public class PascaSarjana extends Mahasiswa implements ICumlaude, IBerprestasi{ + public PascaSarjana(String nama){ + super(nama); + } + + @Override + public void lulus() { + System.out.println("Aku usdah menyelesaikan TESIS"); + } + + @Override + public void meraihIPKTinggi() { + System.out.println("IPK-ku lebih dari 3,71"); + } + + @Override + public void menjuaraiKompetisi() { + System.out.println("Saya telah menjuarai kompetisi INTERNASIONAL"); + } + + @Override + public void membuatPublikasiIlmiah() { + System.out.println("Saya menerbitkan artikel di jurnal INTERNASIONAL"); + } +} diff --git a/PBO_Jobsheet10_1941720144/src/main/java/interfacelatihan/Rektor.java b/PBO_Jobsheet10_1941720144/src/main/java/interfacelatihan/Rektor.java new file mode 100644 index 0000000..2e57935 --- /dev/null +++ b/PBO_Jobsheet10_1941720144/src/main/java/interfacelatihan/Rektor.java @@ -0,0 +1,34 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package interfacelatihan; + +/** + * + * @author Zidan + */ +public class Rektor { + public void beriSertifikatICumlaude(ICumlaude mahasiswa){ + System.out.println("Saya REKTOR, memberikan sertifikat cumlaude"); + System.out.println("Selamat! silahkan perkenalkan diri Anda.."); + + mahasiswa.lulus(); + mahasiswa.meraihIPKTinggi(); + mahasiswa.kuliahDiKampus(); + + System.out.println("-------------------------------------------"); + } + + public void beriSertifikatMAwapres(IBerprestasi mahasiswa){ + System.out.println("Saya REKTOR, memberikan sertifikat MAWAPRES"); + System.out.println("Selamat! Bagaimana Anda bisa berprestasi?"); + + mahasiswa.menjuaraiKompetisi(); + mahasiswa.membuatPublikasiIlmiah(); + + + System.out.println("-------------------------------------------"); + } +} diff --git a/PBO_Jobsheet10_1941720144/src/main/java/interfacelatihan/Sarjana.java b/PBO_Jobsheet10_1941720144/src/main/java/interfacelatihan/Sarjana.java new file mode 100644 index 0000000..f9f3e8f --- /dev/null +++ b/PBO_Jobsheet10_1941720144/src/main/java/interfacelatihan/Sarjana.java @@ -0,0 +1,27 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package interfacelatihan; + +/** + * + * @author Zidan + */ +public class Sarjana extends Mahasiswa implements ICumlaude{ + public Sarjana(String nama){ + super(nama); + } + + @Override + public void lulus() { + System.out.println("Aku sudah menyelesaikan SKRIPSI"); + } + + @Override + public void meraihIPKTinggi() { + System.out.println("IPK-ku lebih dari 3,51"); + } + +} diff --git a/PBO_Jobsheet10_1941720144/src/main/java/interfacelatihan/interfacemain.java b/PBO_Jobsheet10_1941720144/src/main/java/interfacelatihan/interfacemain.java new file mode 100644 index 0000000..c8bf3f9 --- /dev/null +++ b/PBO_Jobsheet10_1941720144/src/main/java/interfacelatihan/interfacemain.java @@ -0,0 +1,29 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package interfacelatihan; +import interfacelatihan.ICumlaude; +import interfacelatihan.Mahasiswa; +import interfacelatihan.PascaSarjana; +import interfacelatihan.Rektor; +import interfacelatihan.Sarjana; +/** + * + * @author Zidan + */ +public class interfacemain { + public static void main(String[] args) { + Rektor pakrektor=new Rektor(); + + Mahasiswa mhsBiasa=new Mahasiswa("Charlie"); + Sarjana sarjanaCumlaude=new Sarjana("Dini"); + PascaSarjana masterCumlaude=new PascaSarjana("Elok"); + + // pakrektor.beriSertifikatICumlaude(mhsBiasa); + pakrektor.beriSertifikatICumlaude(sarjanaCumlaude); + pakrektor.beriSertifikatICumlaude(masterCumlaude); + sarjanaCumlaude.kuliahDiKampus(); + } +} diff --git a/PBO_Jobsheet10_1941720144/src/main/java/tugas.rar b/PBO_Jobsheet10_1941720144/src/main/java/tugas.rar new file mode 100644 index 0000000000000000000000000000000000000000..edb9e87da8d1790ca1a58126bb6f49665717a051 GIT binary patch literal 2938 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 literal 0 HcmV?d00001 diff --git a/PBO_Jobsheet10_1941720144/src/main/java/tugas/Binatang.java b/PBO_Jobsheet10_1941720144/src/main/java/tugas/Binatang.java new file mode 100644 index 0000000..efcf70d --- /dev/null +++ b/PBO_Jobsheet10_1941720144/src/main/java/tugas/Binatang.java @@ -0,0 +1,38 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package tugas; + +/** + * + * @author Zidan + */ +public abstract class Binatang { + protected String nama; + protected int jmlKaki; + + public Binatang(String nama, int jmlKaki){ + this.nama=nama; + this.jmlKaki=jmlKaki; + } + + public void setNama(String nama){ + this.nama=nama; + } + + public String getNama(){ + return nama; + } + + public void setKaki(int jmlKaki){ + this.jmlKaki=jmlKaki; + } + + public int getKaki(int jmlKaki){ + return jmlKaki; + } + + public abstract void displayBinatang(); +} diff --git a/PBO_Jobsheet10_1941720144/src/main/java/tugas/Gorilla.java b/PBO_Jobsheet10_1941720144/src/main/java/tugas/Gorilla.java new file mode 100644 index 0000000..f4313f4 --- /dev/null +++ b/PBO_Jobsheet10_1941720144/src/main/java/tugas/Gorilla.java @@ -0,0 +1,37 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package tugas; + +/** + * + * @author Zidan + */ +public class Gorilla extends Binatang implements IKarnivora, IHerbivora{ + private String suara; + private String warnaBulu; + + public Gorilla(String nama, int jmlKaki, String suara, String warnaBulu){ + super(nama, jmlKaki); + this.suara=suara; + this.warnaBulu=warnaBulu; + } + + @Override + public void displayBinatang() { + System.out.println("Nama Hewan :"+super.nama); + System.out.println("Jumlah Kaki :"+super.jmlKaki); + } + + @Override + public void displayMakan() { + System.out.println("Gorilla adalah jenis Hewan Karnivora dan juga Herbivora"); + } + + public void displayData(){ + System.out.println("Suara: "+this.suara); + System.out.println("Warna Bulu :"+this.warnaBulu); + } +} diff --git a/PBO_Jobsheet10_1941720144/src/main/java/tugas/IHerbivora.java b/PBO_Jobsheet10_1941720144/src/main/java/tugas/IHerbivora.java new file mode 100644 index 0000000..608d897 --- /dev/null +++ b/PBO_Jobsheet10_1941720144/src/main/java/tugas/IHerbivora.java @@ -0,0 +1,14 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package tugas; + +/** + * + * @author Zidan + */ +public interface IHerbivora { + public void displayMakan(); +} diff --git a/PBO_Jobsheet10_1941720144/src/main/java/tugas/IKarnivora.java b/PBO_Jobsheet10_1941720144/src/main/java/tugas/IKarnivora.java new file mode 100644 index 0000000..f6459db --- /dev/null +++ b/PBO_Jobsheet10_1941720144/src/main/java/tugas/IKarnivora.java @@ -0,0 +1,14 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package tugas; + +/** + * + * @author Zidan + */ +public interface IKarnivora { + public void displayMakan(); +} diff --git a/PBO_Jobsheet10_1941720144/src/main/java/tugas/Keledai.java b/PBO_Jobsheet10_1941720144/src/main/java/tugas/Keledai.java new file mode 100644 index 0000000..7cd3634 --- /dev/null +++ b/PBO_Jobsheet10_1941720144/src/main/java/tugas/Keledai.java @@ -0,0 +1,37 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package tugas; + +/** + * + * @author Zidan + */ +public class Keledai extends Binatang implements IHerbivora{ + private String suara; + private String warnaBulu; + + public Keledai(String nama, int jmlKaki, String suara, String warnaBulu){ + super(nama, jmlKaki); + this.suara=suara; + this.warnaBulu=warnaBulu; + } + + @Override + public void displayBinatang() { + System.out.println("Nama Hewan :"+super.nama); + System.out.println("Jumlah Kaki :"+super.jmlKaki); + } + + @Override + public void displayMakan() { + System.out.println("Keledai adalah jenis Hewan Herbivora"); + } + + public void displayData(){ + System.out.println("Suara: "+this.suara); + System.out.println("Warna Bulu :"+this.warnaBulu); + } +} diff --git a/PBO_Jobsheet10_1941720144/src/main/java/tugas/Main.java b/PBO_Jobsheet10_1941720144/src/main/java/tugas/Main.java new file mode 100644 index 0000000..06b1710 --- /dev/null +++ b/PBO_Jobsheet10_1941720144/src/main/java/tugas/Main.java @@ -0,0 +1,31 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package tugas; + +/** + * + * @author Zidan + */ +public class Main { + public static void main(String[] args) { + Singa sg=new Singa("Singa",4,"rrraaaaauuuu","Coklat Keemasan"); + Keledai kld=new Keledai("Keledai",4,"ngiihhaa","Abu-abu"); + Gorilla grl=new Gorilla("Gorilla",2,"gwaooo","Hitam ke Abu-Abu an"); + + sg.displayBinatang(); + sg.displayMakan(); + sg.displayData(); + System.out.println(""); + kld.displayBinatang(); + kld.displayMakan(); + kld.displayData(); + System.out.println(""); + grl.displayBinatang(); + grl.displayMakan(); + grl.displayData(); + System.out.println(""); + } +} diff --git a/PBO_Jobsheet10_1941720144/src/main/java/tugas/Singa.java b/PBO_Jobsheet10_1941720144/src/main/java/tugas/Singa.java new file mode 100644 index 0000000..2f91944 --- /dev/null +++ b/PBO_Jobsheet10_1941720144/src/main/java/tugas/Singa.java @@ -0,0 +1,37 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package tugas; + +/** + * + * @author Zidan + */ +public class Singa extends Binatang implements IKarnivora{ + private String suara; + private String warnaBulu; + + public Singa(String nama, int jmlKaki, String suara, String warnaBulu){ + super(nama, jmlKaki); + this.suara=suara; + this.warnaBulu=warnaBulu; + } + + @Override + public void displayBinatang() { + System.out.println("Nama Hewan :"+super.nama); + System.out.println("Jumlah Kaki :"+super.jmlKaki); + } + + @Override + public void displayMakan() { + System.out.println("Singa adalah jenis Hewan Karnivora"); + } + + public void displayData(){ + System.out.println("Suara: "+this.suara); + System.out.println("Warna Bulu :"+this.warnaBulu); + } +}