static void Main(string[] args) { Person ps = new Person(); ps.Hello(); Student st = new Student(); st.Hello(); st.SetAge(21); st.ShowAge(); Teacher tc = new Teacher(); tc.Hello(); tc.SetAge(30); tc.Explain(); }
static void Main(string[] args) { Person person = new Person(); person.Hello(); Student student = new Student(); student.SetAge(21); student.Hello(); student.ShowAge(); Teacher teacher = new Teacher(); teacher.SetAge(30); teacher.Hello(); teacher.Explain(); }