/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package hs; /** * * @author androidbie.com */ public class Main { public static void main(String[] args) { //kita panggi si sub classnya // #1 Employee pg = new Employee("Anree", "21", "Front Office"); pg.setHospitalName("Hospital ABC"); //method super class pg.setHospitalAddress("Victoria Street No 78"); //method superclass //#2 Employee pg1 = new Employee("John A", "26", "Doctor Specialist"); pg1.setHospitalName("Hospital GGG"); //method super class pg1.setHospitalAddress("Roma, Italy"); //method superclass //Show ID Card #1 System.out.println("ID Card"); System.out.println(""); System.out.println("Employee Name : \t\t" + pg.getEmployeeName()); System.out.println("Title : \t\t" + pg.getEmployeeTitle()); System.out.println("Hospital Name :\t" + pg.getHospitalName());//method superclass System.out.println("Hospital Address :\t"+ pg.getHospitalAddress());//method superclass System.out.println(""); System.out.println(""); //Show ID Card #2 System.out.println("ID Card"); System.out.println(""); System.out.println("Employee Name : \t\t" + pg1.getEmployeeName()); System.out.println("Title : \t\t" + pg1.getEmployeeTitle()); System.out.println("Hospital Name :\t" + pg1.getHospitalName());//method superclass System.out.println("Hospital Address :\t"+ pg1.getHospitalAddress());//method superclass } }