INTERFACE (Ria Suryani / 2012420033)

INTERFACE (Ria Suryani / 2012420033)

public class HandPhone {
    String tampil;
    public void tampil(){
        tampil="SPESIFIKASI HP";
        System.out.println(""+tampil);
        System.out.println("==============");
    }
    interface jenis{
        public void merk();
        public void type();
        public void warna();
    }
    interface isi{
        public void baterai();
        public void memory();
        public void camera();
    }
    interface proses{
        public void sms();
        public void telepon();
        public void media();
    }
 }

public class HP_Interface implements HandPhone.jenis, HandPhone.isi, HandPhone.proses {

    @Override
    public void merk() {
        System.out.println("Merk HP: Blacberry");
    }

    @Override
    public void type() {
        System.out.println("Type HP: Bold 9300");
    }

    @Override
    public void warna() {
        System.out.println("Warna HP: putih");
    }

    @Override
    public void baterai() {
        System.out.println("Type Baterai: C-S2");
    }

    @Override
    public void memory() {
        System.out.println("Memory: V-Gen 2GB");
    }

    @Override
    public void camera() {
        System.out.println("Camera quality: 5MP");
    }

    @Override
    public void sms() {
        System.out.println("SMS: 3 unread message");
    }

    @Override
    public void telepon() {
        System.out.println("Phohe: 5 missed call");
    }

    @Override
    public void media() {
        System.out.println("Media: music,videos,camera,voice note recorder,video camera");
    }
    public static void main(String[] args) {
        HandPhone x=new HandPhone();
        x.tampil();
        HP_Interface y=new HP_Interface();
        y.merk();
        y.type();
        y.warna();
        y.baterai();
        y.memory();
        y.camera();
        y.sms();
        y.telepon();
        y.media();
    }
}


















share this article to: Facebook Twitter Google+ Linkedin Technorati Digg
Posted by arek informatika, Published at 00.38 and have 0 komentar

Tidak ada komentar:

Posting Komentar