TUGAS8:nama:moch.saiful rizal nim:2012420010 (interface)

TUGAS8:nama:moch.saiful rizal nim:2012420010 (interface)

package chipul;

/**
 *
 * @author USER
 */
public interface interface_televisi {
    interface toshiba{
    void nama_T();
    void type_T();
    void ukuran_T();
}
  interface panasonic{
    void nama_P();
    void type_P();
    void ukuran_P();
  }
  interface polytron{
    void nama_Pl();
    void type_Pl();
    void ukuran_Pl();
  }
  
}
class cok implements interface_televisi.toshiba,interface_televisi.panasonic,interface_televisi.polytron{

    @Override
    public void nama_T() {
        System.out.println("nama TV = thosiba");
    }

    @Override
    public void type_T() {
        System.out.println("type TV = LCD");
    }

    @Override
    public void ukuran_T() {
        System.out.println("ukuran TV =21'");
    }

    @Override
    public void nama_P() {
        System.out.println("nama TV = polytron");
    }

    @Override
    public void type_P() {
        System.out.println("type TV = LCD");
    }

    @Override
    public void ukuran_P() {
        System.out.println("ukuran TV = 32'");
    }

    @Override
    public void nama_Pl() {
        System.out.println("nama TV = panasonic");
    }

    @Override
    public void type_Pl() {
        System.out.println("type TV = TABUNG");
    }

    @Override
    public void ukuran_Pl() {
        System.out.println("ukuran TV = 21'");
    }
   
}
class c {
    public static void main(String[] args) {
        cok x= new cok();
        x.nama_P();
        x.type_P();
        x.ukuran_P();
        x.nama_Pl();
        x.type_Pl();
        x.ukuran_Pl();
        x.nama_T();
        x.type_T();
        x.ukuran_T();
    }
   
}













share this article to: Facebook Twitter Google+ Linkedin Technorati Digg
Posted by Dewi Wahyuni, Published at 12.58 and have 0 komentar

Tidak ada komentar:

Posting Komentar