Postingan

Menampilkan postingan dari November, 2018

Tugas #PBOA-tugas 10 (Image Viewer 1-0)

Gambar
Image Viewer 1.0 Untuk membuat image viewer versi 1.0 diperlukan sejumlah kelas berikut : ImageViewer ImagePanel ImageFileManager OFImage Berikut source code yang digunakan : ImageViewer import java.awt.*; import java.awt.event.*; import javax.swing.*; import java.io.File; /** * Write a description of class ImageViewer here. * * @author (Nitama Nurlingga Yotifa) * @version (20181126) */ public class ImageViewer { // static fields: private static final String VERSION = "Version 1.0"; private static JFileChooser fileChooser = new JFileChooser(System.getProperty("user.dir")); // fields: private JFrame frame; private ImagePanel imagePanel; private JLabel filenameLabel; private JLabel statusLabel; private OFImage currentImage; /** * Create an ImageViewer show it on screen. */ public ImageViewer() { currentImage = null; makeFrame

tugas #PBOA-tugas 8 (Sistem Akademik)

Gambar
Sistem Akademik Untuk membuat sistem akademik diperlukan sejumlah class, yaitu sebagai berikut : Data Mahasiswa Dosen Pegawai Matakuliah Kelas Buku Database Berikut source code yang digunakan : Data /** * Write a description of class Data here. * * @author (Nitama Nurlingga Yotifa) * @version (20181119) */ public class Data { private String nama; private String noTelp; public Data(String Nama, String NoTelp) { nama = Nama; noTelp = NoTelp; } public void display() { System.out.println("Nama : "+nama); System.out.println("No Telepon : "+noTelp); } public String getNama() { return nama; } } Mahasiswa import java.util.ArrayList; /** * Write a description of class Mahasiswa here. * * @author (Nitama Nurlingga Yotifa) * @version (20181119) */ public class Mahasiswa extends Data { private Str

Tugas #PBOA-tugas 9 (The foxes and Rabbits Simulator)

Gambar
The foxes and Rabbits Simulator Untuk membuat simulator foxes and rabbits diperlukan sejumlah class sebagai berikut : Counter Field FieldStat Fox Location Rabbits Randomizer Simulator SimulatorView Berikut source code yang digunakan : Counter import java.awt.Color; /** * Write a description of class Counter here. * * @author (Nitama Nurlingga Yotifa) * @version (20181119) */ /** * Provide a counter for a participant in the simulation. * This includes an identifying string and a count of how * many participants of this type currently exist within * the simulation. * */ public class Counter { // A name for this type of simulation participant private String name; // How many of this type exist in the simulation. private int count; /** * Provide a name for one of the simulation types. * @param name A name, e.g. "Fox". */ public Counter(String name)