static void Main() { Pudle p = new Pudle(); p.name = "푸들이"; p.jitda(); p.work(); Jindo j = new Jindo(); j.name = "진돌이"; j.jitda(); j.run(); }
static void Main() { Dog p = new Pudle(); p.name = "푸들이"; p.jitda(); // 푸들푸들 ((Pudle)p).work(); Dog j = new Jindo(); j.name = "진돌이"; j.jitda(); // 진돌진돌 ((Jindo)j).run(); }