Langsung ke konten utama

Postingan

Menampilkan postingan dari Oktober, 2018

UTS Parking Meter

Hai semuanya. Pos ini berisi tentang cara mengimplementasikan ke dalam bahasa Java sebuah mesin parkir elektronik. Sebagai contoh, coba lihat Mesin Parkir Elektronik yang telah dikembangkan oleh Dinas Perhubungan Kota Surabaya di sekitar Taman Bungkul. Proyek ini menggunakan 2 class, di antaranya: ParkingMeter InputReader Berikut source codenya: ParkingMeter /** * Class ini untuk class inti(main). * * @author (Elkana Hans Widersen/05111740000127/PBO A) * @version (15/10/2018) */ import java.util.Calendar; import java.util.Date; public class ParkingMeter{ private InputReader reader; private String TerminalID, JenisKendaraan, Nopol; private int NoTiket = 0, TarifParkir, SaldoAwal; private Calendar calendar; private Date today, tomorrow; public ParkingMeter() { reader = new InputReader(); calendar = Calendar.getInstance(); TerminalID = "00000001"; } ...

Tugas PBO Psychological Support Chatbot

Hi! We're back again! This time I'm going to show you my recent project on making a chatbot for technical support, called Monokuro Boo. It's great for you if you have traumas, problems, distress, etc. I'm using 3 classes for this chatbot, which are: SupportSystem InputReader Responder These are the source code. Check it out! SupportSystem /** * The main class for the support system, consisting greetings template. * * @author (Elkana Hans Widersen) * @version (08.10.2018) */ public class SupportSystem { private InputReader reader; private Responder responder; /** * Creates a technical support system. */ public SupportSystem() { reader = new InputReader(); responder = new Responder(); } /** * Start the technical support system. This will print a * welcome message and enter into a dialog with the user, * until the user ends the dialo...

Tugas PBO Auction Simulator

Hey, guys! Today I'm so excited to show you how to implement an Auction Simulator into Java. We are going to use 4 classes, which are: Auction Bid Lot Person You can check the source code of each classes below before we try to execute this program. Auction /** * A simple model of an auction * * @author Elkana Hans Widersen * @version 02.10.2018 */ import java.util.ArrayList; public class Auction { // The list of Lots in this auction. private ArrayList<Lot> lots; // The number that will be given to the next lot entered // into this auction. private int nextLotNumber; /** * Creates a new auction. */ public Auction() { lots = new ArrayList<Lot>(); nextLotNumber = 1; } /** * Enters a new lot into the auction. * @param description = A description of the lot. */ public void enterLot(String description) { lots.add(n...