Langsung ke konten utama

Tugas 1 PBO A

This is my biodata compiled in Java (first time usage). Check it out!



 /**  
  * Program membuat biodata menggunakan Java - BlueJ  
  *  
  * Author : Elkana Hans W  
  * Version 1 , Date : 3 September 2018  
  */  
 public class biodata{  
   public biodata(){  
     System.out.print("PBO-Tugas1\n");  
     System.out.print("Nama\t: Elkana Hans Widersen\n");  
     System.out.print("Kelas\t: PBO A\n");  
     System.out.print("Alamat Rumah: Merak III/P2-104 Rewwin\n");  
     System.out.print("Email\t: elknhns@gmail.com\n");  
     System.out.print("Blog\t: elkanahans.blogspot.com\n");  
     System.out.print("No HP/WA: 082143646716\n");  
     System.out.print("Twitter\t: @elknhns\n");  
   }  
 }  

Komentar

Postingan populer dari blog ini

Tugas 3 PBO A

Hey guys! This time I have been working on making my own Ticket Machine using BlueJ. I am using 2 classes, which is Main and TicketMachine . TicketMachine /* * This class contains the declaration of the Ticket Machine we are going to use.. * * @author (Elkana Hans Widersen) * @version (17/9/2018) */ import java.util.Scanner; public class TicketMachine{ Scanner scan = new Scanner(System.in); // The price of a ticket from this machine. private int price; // The amount of money entered by a customer so far. private int balance; // The amount of tickets about to be printed. private int ticket; // The total amount of money collected by this machine. private int total; /* * Create a machine that issues tickets of the given price. * Note that the price must be greater than zero, and there * are no checks to ensure this. */ public TicketMachine(int ticketCost){ ...

Fox and Rabbit Simulator

Hi guys! I'm going to show you a Fox and Rabbit Simulator made in BlueJ. We're going to use these classes Simulator SimulatorView Location Field FieldStats Counter Randomizer Rabbit Fox Here is the source code of those classes: Simulator import java.util.Random; import java.util.List; import java.util.ArrayList; import java.util.Iterator; import java.awt.Color; /** * A simple predator-prey simulator, based on a rectangular field * containing rabbits and foxes. * * @author Elkana Hans Widersen * @version 1.0 */ public class Simulator { /** * Constants representing configuration information for the simulation. */ private static final int def_width = 50; // The default width for the grid. private static final int def_depth = 50; // The default depth of the grid. private static final double foxProbability = 0.02; // The probability that a fo...