Tag:Subclass

  • C++ Basics – classes and objects (2)

    Time:2022-7-18

    C++ – classes and objects (2) – inheritance inherit A little introduction There are special relationships between some classes, as shown in the following figure: When defining these classes, the subordinate members not only have the commonalities of the upper class, but also have their own characteristics. At this time, the inheritance technology can be […]

  • Common Java classes (IX) formatting classes

    Time:2022-7-15

    Function of dateformat class Converts the time object into a string in the specified format. On the contrary, the string in the specified format is converted into an event object Dateformat is an abstract class, which is generally implemented by its subclass simpledateformat   The specific meaning of formatting characters in the code:     […]

  • C++ Basics – classes and objects (3)

    Time:2022-7-13

    C++ classes and objects (3) – polymorphism An interface has many forms. The incoming objects are different, and the operations performed by the same interface are different Basic concepts of polymorphism Polymorphism falls into two categories Static polymorphism: function overloading and operator overloading belong to static polymorphism and reuse function names Dynamic polymorphism: derived classes […]

  • Design pattern – Preface

    Time:2022-7-11

    classification Creative, structural, behavioral main points Good object-oriented design — coping with changes and improving reuse Apply design patterns at points of change Refactoring key techniques static — > DynamicEarly binding — > late bindingInheritance — > combinationCompile time dependency — > runtime dependencyTight coupling — > loose coupling The premise of design pattern application […]

  • A review of Java introductory knowledge (Part 2)

    Time:2022-7-10

    preface This isRecommend learning javaThe third part of the series, this section contains a lot of content. For Xiaobai, it is a new concept. If you want to master it skillfully, you need a lot of practice. The guide map of this section will be very large. The editor will provide the guide map separately […]

  • In OC, what kind of chemical reaction will the coverage attribute have?

    Time:2022-7-10

    When writing a custom album function, it needs to inheritUINavigationControllerWrite oneImagePickerViewController, at the same timeImagePickerViewControllerIt also needs to communicate with other classes, so it’s natural,Imagepickerviewcontroller classYou need onedelegateAttribute, and this attribute needs to be an implementation of customizationImagePickerViewControllerDelegateThe attribute of the agreement, then the problem comes:The parent class already has such an attribute。 Write this […]

  • @Property difficulties

    Time:2022-7-6

    @Property difficulties @Property we all know that the corresponding setter and getter methods can be automatically synthesized according to the given memory management semantics and atomic and non atomic settings. However, you may not know what @property did besides that. The confusion and Caton in the development caused by these ignorance are particularly unpleasant. The […]

  • C++ foundation-7-polymorphism

    Time:2022-7-5

    7. Polymorphism 7.1 basic usage of polymorphism 1 #include 2 using namespace std; 3 4 // polymorphism 5 6 // dynamic polymorphism meets the conditions: 7 // 1. Have inheritance relationship 8 // 2. Subclass overrides virtual function of parent class 9 // 10 // dynamic polymorphic use 11 // the pointer or reference of […]

  • [flutter 1-11] flutter tutorial dart language – classes, member variables and methods of classes, constructors of classes

    Time:2022-7-5

    Author | VladSource | Vlad (official account: fulade_me) class Dart is an object-oriented language. All objects are instances of a class, and all classes inherit fromObjectClass. Every exceptObjectClasses other than classes have only one superclass, and the code of one class can be reused in the inheritance of other classes. Instance variables of class The […]

  • Inversion and covariance in LSP principle

    Time:2022-7-5

    In the review process, LSP principle is a very important content. Here is the definition of LSP principle. LSP definitionFunctions that use pointers or referrnces to base classes must be able to use objects of derived classes without knowingit. (all places that reference the base class must be able to use the objects of its […]

  • Adapter mode of design mode

    Time:2022-6-30

    The adapter mode is also called wrapper, which belongs to the structural mode; It is to transform the interface of a class into another interface expected by the client, so that two classes that cannot be grouped together due to interface mismatch can work together. The main purpose of the adapter pattern is compatibility. There […]

  • Bridging mode of design mode

    Time:2022-6-28

    Bridge mode, also known as bridge mode, belongs to structural mode, which means thatAbstractionAndRealization decoupling , so that the two can be changed independently. It is implemented by using composition relationship instead of inheritance relationship, which reduces the coupling between the two variable dimensions of abstraction and implementation. Abstraction The common conceptual connection existing in […]