Java se -- abstract classes and interfaces

abstract class summary Abstract class introduction The method in the parent class is overridden by its subclasses, and the implementation of subclasses is different. Then the method declaration and method body of the parent class only have meaning, while the method body has no meaning (because the subclass object will call its own overridden ...

Posted by markwillis82 on Sun, 26 Dec 2021 13:28:14 +0100

Object oriented (understand!)

ps: Learning Meet the crazy God My study notes Process oriented & object oriented Process oriented thought The steps are clear and simple, what to do in the first step, what to do in the second stepFacing the process, it is suitable to deal with some relatively simple problems Object oriented thought Birds of a feather flock togeth ...

Posted by kiwiwilliam on Sun, 26 Dec 2021 02:40:27 +0100

Detailed explanation of the relationship between virtual function table and virtual function pointer

Is the virtual function table a class? 1. The virtual function table belongs to a class, and all objects of the class share the virtual function table of this class. 2. The virtual function tables of different objects are the same (the first function address of the virtual function table is the same); 3. A pointer vptr pointing to the virtual f ...

Posted by varecha on Thu, 16 Dec 2021 21:43:27 +0100

Encapsulation -- one of the three object-oriented features of java

1. Encapsulation (private) It refers to hiding the properties and implementation details of objects, and only providing public access. Benefits: Hide implementation details and provide public access It improves the reusability of the code Improve security. Packaging principle: Hide all contents that do not need to be provided externally. H ...

Posted by gaza165 on Wed, 15 Dec 2021 19:12:10 +0100

Error and Exception exceptions and custom exceptions

Exception Error and exception What is an exception In real life; The situation may not be perfect. For example, you write a module. User input does not necessarily meet your requirements. Your program wants to open a file. The file may not exist or the file format is wrong. You want to read the data of the database, the database may be empty, ...

Posted by nellson on Tue, 07 Dec 2021 22:28:50 +0100

Python object oriented programming 03: class inheritance and its derived terms

Chapter 38 of the official Python column, students stop. Don't miss this article starting from 0! In the previous article, the School Committee showed and shared object-oriented programming and Deep understanding of class structure Finally, I mentioned inheritance a little. This time we will explain the terms of inheritance and inheritance ...

Posted by syd on Sat, 04 Dec 2021 23:15:44 +0100

Java object oriented programming

catalogue package Import classes in package Static import Common system packages inherit rule of grammar protected keyword   final keyword polymorphic Upward transformation   Method rewrite   Dynamic binding   Understanding polymorphism Downward transformation abstract class rule of grammar:   Role of a ...

Posted by kumschick on Sat, 20 Nov 2021 06:08:50 +0100

Python - object oriented - Day08

Object oriented programming and functional programming (process oriented programming) are both methods of programming, but there are some differences. Process oriented programming: 1. Import various external libraries 2. Design various global variables 3. Write a function to complete a function 4. Write a function to complete a function 5. Wr ...

Posted by DarrenL on Fri, 19 Nov 2021 11:32:28 +0100

Visitor mode

brief introduction Digression: This is the last of the 23 design modes to be written. When I haven't finished writing, I always want to write quickly. Now I'm about to finish writing. I feel that time flies. It took three months to write this series, but I chewed down this hard bone, which is worth recording. Visitor mode, known as the most ...

Posted by neave on Tue, 02 Nov 2021 19:53:51 +0100

Detailed usage of class members and modifiers in Python object-oriented

Overview of class 1 members Class members can be divided into three categories: fields, methods, and properties. The main relationships are as follows: In the members of the above class, common fields are stored in objects; Other members are stored in the class, that is, no matter how many objects are created, the object itself only retains t ...

Posted by iJoseph on Fri, 08 Oct 2021 08:43:56 +0200