Python learning notes (14) Python class (1), learning notes python class

Source: Internet
Author: User

Python learning notes (14) Python class (1), learning notes python class

Basic Concepts

Problem Space: The problem space is the full understanding of a problem. It is composed of the information contained in the problem and the stored information.

Initial status: incomplete information or unsatisfactory status at the beginning;

Target status: the desired information or status;

Operation: steps you may take to move from the initial state to the target State.

Object is a term in Object Oriented. It represents a specific thing in the Namespace of the objective world, it also represents the basic elements in the software system solution space.

Object: an object has its own State, behavior, and unique identifier. The structures and behaviors of all objects of the same type are defined in their common classes.

State: includes the existing attributes of the object (usually defined in the class) and the current attribute values of the object (these attributes are often dynamic)

Behavior: it refers to how an object affects the outside world and is influenced by the outside world, as it changes its State and transmits information.

Identity: an object has different attributes from all other objects. (Essentially the address of the object created in the memory)

Generally speaking, an object should have at least two contents: one attribute (State) and one method (behavior ).

Object-oriented: Object-oriented programming (OOP) is a type of programming model and a method for program development. An object refers to a class instance. It uses objects as the basic unit of a program and encapsulates programs and data.

To improve software reusability, flexibility, and scalability.

Class: in Object-Oriented Programming, class is a construction of an object-oriented computer programming language and a blueprint for creating objects, describes the common attributes and methods of the created object.

Basic Methods for writing classes"

Class Name:

Attribute

Method

    

     

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.