Tuesday, April 2, 2013

TELEVISI

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package canel;

/**
 *
 * @author caca
 */
public class Canel {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        // TODO code application logic here
       
        System.out.println("=======Welcome======");
        System.out.println("        TOSHIBA        ");
        System.out.println("    Make Believe    ");
        System.out.println("Pilihan Mode :");
        System.out.println("1.Pemutar Media \n2.Mode Internet \n3.Mode Televisi");
        System.out.println("\nAnda Memilih Mode : ");
        clasmode X = new clasmode();
        X.setM(3);
        switch (X.Mods) {
            case 1:  System.out.println("Mode Pemutar Media");
                     System.out.println("Pilihan Menu : ");
                     System.out.println("1.Pemutar Video \n2.Pemutar Music");
                     System.out.println("Pilihan Anda : ");
                     clasmedia A = new clasmedia();
                     A.setMeds(2);
                     switch (A.Med){
                         case 1: System.out.println("Pemutar Video");
                         break;
                         case 2: System.out.println("Pemutar Music");
                         break;
                     }
                     break;
            case 2:  System.out.println("Mode Internet");
                     System.out.println("Pilihan Web : ");
                     System.out.println("1.Facebook \n2.Yahoo \n3.Detik \n4.Kaskus");
                     System.out.println("Anda Mengunjungi Situs :");
                     clasinternet Z = new clasinternet();
                     Z.setNet(2);
                     switch (Z.Inter){
                         case 1: System.out.println("www.facebook.com");
                         break;
                         case 2: System.out.println("www.yahoo.com");
                         break;
                         case 3: System.out.println("www.detik.com");
                         break;
                         case 4: System.out.println("www.kaskus.co.id");
                         break;  
                     }
                     break;
            case 3:  System.out.println("Mode Televisi");
                     System.out.println("Pilihan Channel : ");
                     System.out.println("1.RCTI \n2.SCTV \n3.INDOSIAR \n4.TPI \n5.MetroTV \n6.TVONE");
                     System.out.println("Anda Memilih Channel : ");
                     clascanel xXx = new clascanel();
                     xXx.setNel(3);
                     switch (xXx.Chan){
                         case 1: System.out.println("RCTI");
                         break;
                         case 2: System.out.println("SCTV");
                         break;
                         case 3: System.out.println("INDOSIAR");
                         break;
                         case 4: System.out.println("TPI");
                         break;
                         case 5: System.out.println("MetroTV");
                         break;
                         case 6: System.out.println("TVONE");
                         break;
                     }
                     break;
          
        }
        System.out.println("Pengatur volume");
        clasvolume abc = new clasvolume();
        abc.setVol(2);
        System.out.println("Volume : "+abc.Volum);
       
    }
}

Clas Volume

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package canel;

/**
 *
 * @author caca
 */
public class clasvolume {
    public int Volum;
    public void setVol(int v){
        if (Volum >= 0 && Volum <= 100){
            Volum = v;
        }
    }
}

Clas Internet

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package canel;

/**
 *
 * @author caca
 */
public class clasinternet {
      public int Inter;
    public void setNet(int v){
        if (Inter >= 0 && Inter <= 4){
            Inter = v;
        }
    }
}
   

Clas Cannel

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package canel;

/**
 *
 * @author caca
 */
public class clascanel {
    public int Chan;
    public void setNel(int v){
        if (Chan >= 0 && Chan <= 6){
            Chan = v;
        }
    }
  }

Clas Media

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package canel;

/**
 *
 * @author caca
 */
public class clasmedia {
     public int Med;
    public void setMeds(int v){
        if (Med >= 0 && Med <= 2){
            Med = v;
        }
    }
  }
   

Clas Mode

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package canel;

/**
 *
 * @author caca
 */
public class clasmode {
     public int Mods;
    public void setM(int v){
        if (Mods >= 0 && Mods <= 3){
            Mods = v;
        }
    }
   
}