Tag:polymorphic

  • Encapsulation, abstraction, inheritance, polymorphism and application in object oriented programming

    Time:2020-8-9

    The key to understand object-oriented programming and object-oriented programming language is to understand its four characteristics: encapsulation, abstraction, inheritance and polymorphism. However, it is not enough to know the definition of these four features. We also need to know the meaning and purpose of each feature, and what programming problems they can solve. Encapsulation First, […]

  • Learning summary of the second stage

    Time:2020-8-9

    PrefaceThis paper mainly describes the operation of this blog The second stage of learning is also over, here to do some summary and review; compared with the first stage of learning, the difficulty is increased, the score of homework is not very good, and it takes more time to complete the homework.1. Summary of operation […]

  • BUAA_ OO_ Unit 4

    Time:2020-7-30

    1、 UML parser design Let’s take a look at the topic first: Unit 4 implementation of aJDK 8With effectiveness checkUML(Unified Modeling Language)Class diagram, sequence diagram, state diagram analyzerMyUmlInteractionIn fact, we want to build a digraph model,UMLCan also be linked to the elements of the same level ​ Input:The above threeUMLThe edge set (non entity element) […]

  • My understanding of C ා polymorphism

    Time:2020-7-27

    Object oriented three elements: encapsulation, inheritance and polymorphism.Encapsulation and inheritance are easy to understand, but it is a little difficult to understand polymorphism. Today, we will talk about the understanding of polymorphism.We should often see interview questions: please talk about the understanding of polymorphism.In fact, polymorphism is very simpleCalling the same method produces different results。There […]

  • JS advanced — Inheritance

    Time:2020-7-16

    inherit The idea of object-oriented programming: according to the requirements, analyze the object, find out the characteristics and behaviors of the object, and realize the requirement through code. To realize this requirement, you need to create an object. If you want to create an object, you should display a constructor. Then you can create an […]

  • JS advanced — Summary inheritance

    Time:2020-7-7

    Summary inheritance   Object oriented features: encapsulation, inheritance, polymorphism Inheritance, the relationship between classes, object-oriented language inheritance is for polymorphic services   JS is not an object-oriented language, but it can simulate object-oriented and inheritance, in order to save memory   Inheritance: Prototype function: data sharing, the purpose is: in order to save memory space, […]

  • Encapsulation, polymorphism

    Time:2020-6-2

    preface: Three features of Python: inheritance, encapsulation and polymorphism. 1. Package:Encapsulate a lot of data into ⼀ objects. Encapsulate fixed function code into ⼀ code blocks, functions, objects, Package into modules. This belongs to the idea of encapsulation. For example, if you write a very B function, this can also be called encapsulation. In the […]

  • Java Foundation: three characteristics of object-oriented

    Time:2020-5-20

    Object-oriented has three characteristics: inheritance, encapsulation and polymorphism. (1) Inheritance: inheritance is a hierarchical model of linking classes, and it allows and encourages class reuse. It provides a way to explicitly express commonality. A new class of an object can be derived from an existing class. This process is called class inheritance. The new class […]

  • The implementation of go language is similar to the instance of polymorphic function in C + +

    Time:2020-5-18

    preface As a rising star in programming language, go language is a good development language, which not only takes advantages of others, but also pays attention to operation efficiency and development efficiency. In go, there is no concept of class, but it can still be usedstruct+interfaceTo implement the function of the class, the following simple […]

  • Java polymorphism

    Time:2020-5-18

    It can be understood as a variety of forms of things. The manifestation of polymorphism: A reference to a parent class points to its own child class object. A reference to a parent class can also receive its own child class object.  The premise of polymorphism: It must be a relationship between classes, either inheritance […]

  • Java polymorphic transformation

    Time:2020-5-13

    There is an upward transformation of polymorphism, and the type is improved When you want to call your own unique method in a subclass, you need to convert the reference of the parent class to the subclass type and transform it downward. Polymorphism is always a subclass object changing. The instanceof operator can only be […]

  • Java polymorphic member functions (static and non static) and the characteristics of member variables

    Time:2020-5-11

    Non static member function: At compile time: see whether there is a method called in the class to which the referential variable belongs. If yes, the compilation passes, if not, the compilation fails. At run time: see if there is a method called in the class to which the object belongs. Summary: when a non […]