Tugas V- Class - Hide From The Sun
Hide From The Sun
 
=====================
Nama: Taufiq Hega Firmansyah
NPM:11108913
Kelas:3 KA 16
=====================
1.
KelasKendaraanSuper.java

    class KelasKendaraanSuper{
pulic void methodAsli(){
string roda;
string stang;
string sadel;
System.out.println("Method milik KelasKendaraanSuper jalan");
}
public static void jalankan (String[]args){
KelasKendaraanSuper oks=new KelasKendaraanSuper();
oks.methodAsli();
}
void rem (String[]args){
KelasKendaraanSuper oks=new KelasKendaraanSuper();
oks.methodAsli();
}
}

SubKelasMotor.java

    class SubKelasMotor extends KelasKendaranSuper{
        public void methodAsli(){
            System.out.println("method overrided jalan");
        }
        public void methodJumping(){
            roda=2;
            System.out.println("kendaraan ber-roda "+roda)
            Super.methodAsli();
        }
        public static void main(String[]args){
            Subkelas osk=new SubKelas();
            osk.methodASli();
            osk.merhodJumping();
        }
        }


SubKelasMobil.java

    class SubKelasMobil extends KelasKendaranSuper{
        public void methodAsli(){
            System.out.println("method overrided jalan");
        }
        public void methodMundur(){
            roda=4;
            System.out.println("kendaraan ber-roda "+roda)
            Super.methodAsli();
        }
        public static void main(String[]args){
            Subkelas osk=new SubKelas();
            osk.methodASli();
            osk.merhodMundur();
        }
        }

2.
Kubus.java

    public class Kubus{
    private double sisi;//attribute yang di hide
    public Kubus(){
        sisi=0;
    }
    private double luas(double s){//encapsulation
        return s*s;
    }
    public void setSisi(double sisi){
        this.sisi=sisi;
    }
    public double getSisi(){
        return sisi;
    }
    Public double getLuas(){
        return luas(sisi);
    }
}       
)

3/7/2011 12:01:06 pm

you can find what you want to in here,make your life full of color ,it's a perfect website.

Reply
3/21/2011 01:26:31 pm

It is hard to imagine a world without the telephone. Our lives have grown to depend on computers linked into phone lines to do our shopping, our banking, or helping us through a typical day work.
When you walk into your office, the first thing you do is to turn on the computer and pull up your electronic mail for the day. Of course, your electronic mail does not come in through the mailbox, bit comes in through telephone lines. The nice thing is you can turn them around by simply forwarding back without having to worry about addressing or stamping or enveloping the information to the person that sent you the message.

Reply
7/26/2011 12:32:03 pm

It is hard to imagine a world without the telephone. Our lives have grown to depend on computers linked into phone lines to do our shopping, our banking, or helping us through a typical day work.

Reply



Leave a Reply.