본문 바로가기

분류 전체보기141

16. Inheritance in Python 1. Inheritance Inheritance in Python is a mechanism that allows one class to inherit the properties and methods of another class. This enables code reuse and extensibility. By default, all classes in Python inherit from a base class called object. Base Class (or Parent Class): The class from which inheritance is derived. Derived Class (or Child Class): The class that inherits properties and meth.. 2024. 3. 19.
16. 파이썬 상속 1. 상속 파이썬에서 상속은 한 클래스의 속성과 메서드를 다른 클래스에 전달하는 기능을 의미합니다. 상속을 사용하면 기존의 코드를 재사용하고 확장할 수 있습니다. 기본적으로 파이썬의 모든 클래스는 object라는 기본 클래스로부터 상속받습니다. 기본 클래스 (또는 부모 클래스) : 상속의 출발점이 되는 클래스입니다. 파생 클래스 (또는 자식 클래스) : 상속을 통해 속성과 메서드를 받는 클래스입니다. 2. 클래스 상속 시 생성자 호출 순서 파이썬에서 상속은 한 클래스의 속성과 메서드를 다른 클래스에 전달하는 기능을 의미합니다. 상속을 사용하면 기존의 코드를 재사용하고 확장할 수 있습니다. 기본적으로 파이썬의 모든 클래스는 object라는 기본 클래스로부터 상속받습니다. 자식 클래스(child class).. 2024. 3. 19.
15. Object-oriented programming and Class 1. Object-Oriented Programming (OOP) Object-Oriented Programming (OOP) is one of the important programming paradigms used for designing and implementing software. This paradigm divides the program into independent entities called "objects" and organizes the program through interactions among these objects. Noun: Variable Verb: Function Programming in this way constitutes object-oriented programm.. 2024. 3. 18.
15. 객체지향과 클래스&과제 1. 객체지향 프로그래밍 객체지향 프로그래밍(Object-Oriented Programming, OOP)은 소프트웨어를 설계하고 구현하는 데 사용되는 중요한 프로그래밍 패러다임 중 하나입니다. 이 패러다임은 프로그램을 "객체"라고 불리는 독립적인 개체로 나누고, 이러한 객체들 간의 상호작용을 통해 프로그램을 구성하는 개발 방법론입니다. 명사 : 변수 동사 : 함수 이걸 통해 프로그램을 짜는게 객체지향 프로그램입니다. 절차지향 프로그래밍 절차지향프로그래밍은 프로그램을 작성할 때 일련의 절차 또는 단계에 따라 코드를 구성하는 방식입니다. 이러한 단계나 절차들은 주로 함수나 서브루틴으로 나누어져 있으며, 각각의 함수는 특정한 작업을 수행합니다. 주로 '입력 - 처리 - 출력'의 순차적인 절차를 따르며, 코드를.. 2024. 3. 18.