Python Object Oriented Programming (OOPs)

所在平台: Udemy

课程主页: https://www.udemy.com/course/python-object-oriented-programming-oops/

课程评论:没有评论

第一个写评论        关注课程

课程简介

Coursera 课程《Python 面向对象编程 (OOPs)》摘要 本课程是为已经掌握 Python 基础知识,并希望深入了解 Python 面向对象编程 (OOP) 的初学者设计的。 **核心理念:** OOP 是一種編程範式,它使用對象和類來組織代碼,旨在模擬現實世界的概念,如繼承、多態、封裝等。OOP 的核心是將數據和對數據進行操作的函數綁定為一個單元,以保護數據免受外部干擾。 **主要概念:** * **類 (Class):** 類是創建對象的藍圖或原型,它定義了一組屬性和方法。例如,用一個 `Dog` 類來管理不同狗的品種和年齡等屬性,比使用列表更結構化和有組織。 * **對象 (Object):** 對象是具有狀態(屬性)和行為(方法)的實體。現實世界中的任何事物,如鼠標、鍵盤,甚至是數字、字符串、列表和字典,都可視為對象。實際上,你可能一直在使用對象而未意識到。 * **多態 (Polymorphism):** * **封裝 (Encapsulation):** * **繼承 (Inheritance):** * **數據抽象 (Data Abstraction):** 本課程將引導您理解並應用這些 OOP 概念,以更有效、更結構化的方式編寫 Python 程序。

课程评论(0条)

课程详情

If you already know Python basics, then this course is the next step in your Python learning path to becoming a Python programmer.this course is specially made for beginners, who want to understand what is object-oriented programming in Python.In Python, object-oriented Programming (OOPs) is a programming paradigm that uses objects and classes in programming. It aims to implement real-world entities like inheritance, polymorphisms, encapsulation, etc. in the programming. The central concept of OOPs is to bind the data and the functions that work on that together as a single unit so that no other part of the code can access this data.Main Concepts of Object-Oriented Programming (OOPs)ClassObjectsPolymorphismEncapsulationInheritanceData AbstractionClassA class is a collection of objects. A class contains the blueprints or the prototype from which the objects are being created. It is a logical entity that contains some attributes and methods.To understand the need for creating a class let's consider an example, let's say you wanted to track the number of dogs that may have different attributes like breed, and age. If a list is used, the first element could represent the dog's breed while the second could represent its age. Let's suppose there are 100 different dogs, then how would you know which element is supposed to be which? What if you wanted to add other properties to these dogs? This lacks organization and it's the exact need for classes.ObjectsThe object is an entity that has a state and behavior associated with it. It may be any real-world object like a mouse, keyboard, chair, table, pen, etc. Integers, strings, floating-point numbers, even arrays, and dictionaries, are all objects. More specifically, any single integer or any single string is an object. The number 12 is an object, the string "Hello, world" is an object, a list is an object that can hold other objects, and so on. You've been using objects all along and may not even realize it.

课程标签

0人关注该课程

主题相关的课程