Postingan

Menampilkan postingan dari Oktober, 2018

UTS

Gambar
UTS souce code dan class : tiketElektronik /** * Write a description of class parkirElektronik here. * * @author (Nitama Nurlingga) * @version (2018) */ public class parkirElektronik { private String platnomor; private int jenis; private int durasi; private int total; public parkirElektronik(String plat) { platnomor = plat; jenis = 0; durasi = 0; } public String getPlatnomor() { return platnomor; } public int getJenis(int jenis) { return jenis; } public int getDurasi(int durasi) { return durasi; } public void printKarcis() { System.out.println("===DINAS PERHUBUNGAN===\n"); System.out.println("===KOTA SURABAYA===\n"); System.out.print("Jenis kendaraan : "); if(jenis == 1) { System.out.println("Motor\n"); } else if(jenis==2)

Tugas #PBOA-tugas 7 (TechSupport system)

Gambar
TechSupport System Untuk membuat techsupport system saya menggunakan tiga class, yaitu : SupportSystem Responder InputReader Berikut adalah soucer code yang digunakan : SupportSystem /** * Write a description of class SupportSytem here. * * @author (Nitama Nurlingga Yotifa) * @version (20181008) * * This class implements a technical support system. It is * the top-level class in this project. The support system * communicates via text input/output in the text terminal. * This class uses an object of class InputReader to read * input from the user and an object of class Responder to * generate responses. * It contains a loop that repeatedly reads input and * generates output until the user wants to leave. */ public class SupportSystem { private InputReader reader; private Responder responder; /** * Creates a technical support system. */ public SupportSystem() { reader = new Inp

Tugas #PBOA-tugas 6 (Auction)

Gambar
AUCTION Untuk membuat sistem lelang (Auction) menggunakan empat class, yaitu : Person Bid Lot Auction Berikut adalah souce code yang digunakan : Person /** * Maintain details of someone who participates in an auction. * @author Nitama Nurlingga Yotifa. * @version 20181007 */ public class Person { // The name of this person. private final String name; /** * Create a new person with the given name. * @param name The person's name. */ public Person(String name) { this.name = name; } /** * @return The person's name. */ public String getName() { return name; } } Bid /** * A class that models an auction bid. * It contains a reference to the Person bidding and the amount bid. * * @author Nitama Nurlingga Yotifa. * @version 20181007 */ public class Bid { // The person making the bid. private final Per