Package com.secondstack.training.basic.inheritance

Examples of com.secondstack.training.basic.inheritance.Student


        Person siti = new Person("Siti", "Bandung");
        showPerson(siti);
       
        showPerson(new Person("Doni", "Semarang"));
       
        Student sahrul = new Student();
        sahrul.setName("Sahrul");
        sahrul.setAlamat("Yogyakarta");
        sahrul.setNoInduk("001");
        sahrul.setSekolah("SMA YOGYAKARTA");
        showStudent(sahrul);
       
        Person juwita = new Student();
        juwita.setName("Juwita");
        juwita.setAlamat("Yogyakarta");
        showPerson(juwita);
        showStudent((Student) juwita);
       
        Student studentJuwita = (Student) juwita;
        studentJuwita.setNoInduk("002");
        studentJuwita.setSekolah("SMA YOGYAKARTA");
        showStudent(studentJuwita);
    }
View Full Code Here

TOP

Related Classes of com.secondstack.training.basic.inheritance.Student

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.