Tag:abstract class

  • Java polymorphic parent class reference points to subclass object (upward transformation)

    Time:2022-4-28

    For example, I have a parent class animal , and a subclass cat , cat class inherits animal, which is the subclass inherits the parent class Animal a = new cat() what does that mean? This is to create a parent class reference to a child class object. What are the benefits of doing so? […]

  • Let you thoroughly understand the static members and abstract methods in typescript

    Time:2022-4-23

    1. Detailed explanation of static in typescript Static member: a property or method modified by static in a class So it’s static properties and static methods Also known as: static members (static members contain static properties and static methods) Static members can be accessed through [class name. Static attribute] when using 2. Accessing and modifying […]

  • Newton. Use of jsonconverter in JSON

    Time:2022-4-16

    1、 Usage scenario: Two classes inherit the same abstract class: /// ///Sandbox base class /// abstract class SandBoxGanmeBase { /// ///Name /// public string Name { get; set; } /// ///Version /// public string Version { get; set; } /// ///Can drive /// public bool CanDrive { get { return true; } } } /// […]

  • Java modifier

    Time:2022-4-16

    1、 Access modifier 1.1 private access control character Current class access If a member method or member variable name is preceded by a private access control character, the member can only be used inside the class. 1.2 default access control character Package access(default) Members or external classes of default access control can be accessed by […]

  • Builder builder mode

    Time:2022-4-15

    >>Return to c# common design mode 1. Introduction 2. Examples 2.1. Examples in the dotnet framework 3. Key points 1. Introduction Generator modeThe creation steps of objects are abstracted into generators, and the sequence of all generation steps can be controlled by a director. The client uses the guidance class and passes it into the […]

  • Concept and use of typescript (VIII) class

    Time:2022-4-10

    Class is a collection of functions. 1: Class definition and basic usage 1: Define a class class lady{ Content = “Hello, I’m Camellia”; say(){ console.log(this.content); } } 2: Call class //Use of classes let camellia = new lady(); camellia.say(); //Output: Hello, I’m camellia 2: Class inheritance 1: Define a girl class to inherit the lady […]

  • Android interview experience

    Time:2022-4-2

    It’s been a month since I came back from the Chinese New Year. I haven’t written an article during this period. This is because I’m ready to change my job. I’ve been interviewing and interviewed four or five companies, but the effect is not very good. Nevertheless, I’ve gained some experience. I’ll record the problems […]

  • PHP design pattern – bridge mode

    Time:2022-3-2

      definition: Bridge mode:Separate the abstract part from its implementation part so that they can change independently.   Structure: Abstraction: abstract class. RefindAbstraction: abstract classes that are refined. Implementor: implementation class. ConcreteImplementor: concrete implementation class. Client: client code.   Code example: Next, use the code to realize an example of color combination. There are three […]

  • Design mode notes: factory mode

    Time:2022-2-5

    This paper is organized by colodoo (paper umbrella)Reference book graphic design mode QQ 425343603 Java learning exchange group (717726984) Factory mode Product Creator (creator) Concrete product Concretecreator (specific creator) Product The product role belongs to the framework and is an abstract class. Creator (creator) The creator role belongs to the framework. It is an abstract […]

  • How many details are you most likely to ignore in a Java interview? The pit guide is for you

    Time:2022-1-22

    Today’s sharing begins. Please give us more advice~ To learn Java, you should clarify your needs and know what you want to do; Analyze ideas and know what to do. Determine the steps and which methods and objects are used in each thinking part. Finally, it is implemented in code and embodied in specific Java […]

  • Abstract classes and interfaces

    Time:2022-1-19

    Abstract class and interface knowledge points Abstract concept: if a class does not have enough information to describe a specific object, we call it abstract class. Abstract methods: abstract methods are modified with abstract General idea: to declare an abstract method in an abstract class, you only need to declare the method without defining the […]

  • C# design pattern — simple factory pattern, factory pattern, abstract factory pattern

    Time:2021-12-29

    1. Foreword In the last article, we wrote the design pattern principles, which can help us write high-quality code when developing programs (pull the hair without touching the whole body). In this series, we still take notes to review various design patterns. Let’s take a look at simple factory patterns, factory patterns and abstract factory […]