""" 메서드 오버라이딩은 원래 기능을 유지하면서 새로운 기능을 덧붙일 때 사용함
중복되는 기능은 자식 클래스에서 다시 만들지 않고, 부모 클래스의 기능을 활용함 """
class Person:
def greeting(self):
print('안녕하세요.')
class Student(Person):
def greeting(self):
super().greeting() # 기반 클래스의 메서드 호출하여 중복을 줄임
print('저는 학생입니다.')
james = Student()
james.greeting()