Postingan

Menampilkan postingan dari September, 2018

PBO A - MEMBUAT JAM DIGITAL

Gambar
SOURCE CODE : ClockDisplay : public class ClockDisplay { private NumberDisplay hours; private NumberDisplay minutes; private String displayString; public ClockDisplay() { hours = new NumberDisplay(24); minutes = new NumberDisplay(60); updateDisplay(); } public ClockDisplay (int hour, int minute) { hours = new NumberDisplay(24); minutes = new NumberDisplay(60); setTime(hour, minute); } public void timeTick() { minutes.increment(); if(minutes.getValue() == 0) { hours.increment(); } updateDisplay(); } public void setTime(int hour, int minute) { hours.setValue(hour); minutes.setValue(minute); updateDisplay(); } public String getTime() { return displayString; } private void updateDisplay () { int hour = hours.getValue(); displayString = hours.getDispl...

PWEB C - Tugas Membuat Laman Berita

Gambar
SOURCE CODE : untuk Index.html : <!DOCTYPE html> <html> <head> <title>TechInAsia News</title> <link rel="stylesheet" href="custom.css"/> </head> <body> <div class="header"> <div class="jarak"> <h2>TechInAsia News</h2> </div> </div> <div class="menu"> <ul> <Li><a href="#">Home</a></Li> <Li><a href="#">Trending</a></Li> </ul> </div> <div class="content"> <div class="jarak"> <!-- kiri --> <div class="kiri"> <!-- blog --> <div class="border"> <div class="jarak"> <h3>How one Silicon Valley investor helps US startups enter Japan</h3> ...

PBO - A TUGAS MEMBUAT PROGRAM REMOTE AC

Gambar
Disini saya hanya menggunakan 4 menu Utama, yaitu : 1. Power  = untuk menghidupkan dan mematikan AC 2. Temp+ = untuk menaikkan suhu AC 3. Temp-  = untuk menurunkan suhu AC 4. Mode   = untuk mengganti mode dari sebuah AC, ada 3 buah mode disini, yaitu AUTO, COOL,                        dan DRY Lalu saya memberikan 1 menu tambahan, yaitu menu "Cabut baterai" menu ini untuk mengakhiri program yang saya buat. Berikut tampilan remote AC : lalu setelah kita pilih menu power : Remot AC jadi "NYALA" kita coba naikkan suhu : suhu awal 23° lalu menjadi 24 ° menurunkan suhu : suhu awal 23° lalu menjadi 22 ° lalu kita coba ganti mode AC nya : mode awal adalah AUTO, lalu dirubah menjadi COOL kita ubah lagi modenya : lalu dari mode COOL, kita ubah menjadi DRY setelah itu coba kita pilih menu terakhir, yaitu Cabut baterai. Yap, selayaknya remot AC pada umumnya, ...

PWEB C - TUGAS CSS

Gambar
Source Code untuk index.html nya : <html> <head> <title>Tugas PWEB C</title> <link rel="stylesheet" href ="custom.css"/> </head> <body> <div class="header"> <div class="jarak"> <h2>Tugas PWEB C</h2> </div> </div> <div class="menu"> <ul> <li><a href="#">Home</a></li> <li><a href="#">About</a></li> <li><a href="#">Blog</a></li> <li><a href="#">Contact</a></li> </ul> </div> <div class="content"> <div class="jarak"> <!-- kiri --> <div class="kiri"> <!-- blog --> <div class="border"> <div class="jarak"...

PBO A - TUGAS TICKET MACHINE

Gambar
SOURCE CODE : import java.util.Scanner; public class TicketMachine { // 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 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) { price = ticketCost; balance = 0; total = 0; } /** * Return the price of a ticket. */ public int getPrice() { return price; } /** * Return the amount of money already inserted for the * next ticket. */ public int getBalance() { return balance; } /** * Receive an amount of money in cents from a customer. */ public void insertMone...

PBO A - TUGAS CLASS 2 (BUAT RUMAH)

Gambar
SOURCE CODE : Class canvas : import javax.swing.*;     import java.awt.*;     import java.util.List;     import java.util.*;     public class Canvas     {       private static Canvas canvasSingleton;       public static final Color hijau_pekat = new Color(0,153,0);      public static final Color coklat = new Color(102,51,0);      public static final Color abuabu = new Color(153,153,153);      public static final Color abuabu_gelap = new Color(51,51,51);     public static Canvas getCanvas()      {       if(canvasSingleton == null) {        canvasSingleton = new Canvas("BlueJ Shapes Demo", 600, 400,           Color.white);     ...

PBO A - TUGAS CLASS

Gambar
Syntax untuk class main nya : public class main { public static void main(String args[]){ triangle segi3; segi3 = new triangle(); bujur busangkar; busangkar = new bujur(); persegip rectangle; rectangle = new persegip(); jajargenjang jajar; jajar = new jajargenjang(); belah ketupat; ketupat = new belah(); segi3.height = 10; segi3.side = 5; double area = segi3.area(); double keliling = segi3.circumference(); System.out.print("Luas segitiga = "+area+" keliling = "+keliling); busangkar.sisi = 5; double luasb = busangkar.luas(); double kelilingb = busangkar.kelilink(); System.out.print("\nLuas bujur sangkar = "+luasb+" keliling = "+kelilingb); rectangle.l = 5; rectangle.p = 10; int luaspp = rectangle.luas(); int kelilingpp = rectangle.keliling(); System.out.print("\nLuas persegi panjang = "+luaspp+" keli...

Tugas PWEB 1

Gambar
Source Code : <html> <head> <title>Curriculum Vitae</title> </head> <body bgcolor="#f6e6b4" width="800px"> <div align="center"> <center> <h1> Curiculum Vitae</h1> </center> <hr /> <h2>Data Pribadi</h2> <table width="800px"> <tr> <td width="25%">Nama</td> <td width="1%">:</td> <td>Nandha Himawan</td> <td rowspan="5"><img src="3x4.jpg" alt="Foto" title="Foto" height="150px" width="100px"></td> </tr> <tr> <td>Tempat, tanggal lahir </td> <td>:</td> <td>Tegal, 27 September, 1999</td> </tr> <tr> <td>Alamat</td> ...

PBO A - TUGAS 1

Gambar
public class test { public test(){ System.out.print("Biodata\n\n"); System.out.print("Nama : Nandha Himawan\n"); System.out.print("Kelas : PBO A\n"); System.out.print("Alamat : Perumahan dosen ITS blok U, no 106\n"); System.out.print("Email : nandhahimawan@gmail.com\n"); System.out.print("Blog : nandhahmwn.blogspot.com\n"); System.out.print("No Hp/WA : 081334495927/087848649206\n"); System.out.print("Twitter : @nandhahmwn\n"); } }