Python learning notes class encapsulation & class inheritance & polymorphic inheritance & class methods and static methods & singleton design pattern
1, Class encapsulation:
1. Concept:
Generalized encapsulation: the definition of functions and classes is the embodiment of encapsulation
Encapsulation in a narrow sense: some attributes of a class do not want to be directly accessed by the outside world in the process of use. Instead, this attribute is private [only held by the current class], ...
Posted by loveccb on Tue, 24 May 2022 14:40:03 +0300
Three characteristics of object-oriented language: encapsulation, inheritance, polymorphism -- encapsulation
1. What is encapsulation?
In a program, encapsulation is an abstraction of a concrete object
To put it simply: hide some parts (privatize), and you can't see other parts of the program (there's no way to call them directly)
Privatization: privatize the features or some methods in the class so that they cannot be used directly by the outside
2 ...
Posted by stry_cat on Sat, 21 May 2022 09:49:33 +0300
Java get time & the most complete summary of time formatting
Java get time & the most complete summary of time formatting
Recently, I have encountered many problems in obtaining the current time in Java, and some have various requirements. Today, I will summarize the methods of obtaining time in Java and the formatting of time output.
Acquisition method
java.util.Date
This is the most commonly us ...
Posted by MHardeman25 on Sat, 14 May 2022 10:50:12 +0300
java week 3, about object-oriented (object-oriented ideas and features, interface, three keywords, permission modifier, code block, internal class)
1: Object oriented thought
1. Characteristics of object-oriented thought
1)Conform to the habits of thought and behavior in the real world!
2)Let's turn the executor into the commander(The role has changed!)
3)Simplify complex things!
2. Object oriented design principles in Java
You need to constantly create objects,Use object,Com ...
Posted by hemantraijain on Wed, 11 May 2022 16:50:24 +0300
java learning Chapter 7 Advanced object-oriented features
Chapter VII Advanced object-oriented features
Article directory:
Class inheritanceInstantiation of subclassesComparison between super and thisKnowledge of packageAccess modifierConstructor access methodMethod coverageUp and down modelingpolymorphicstatic stateSingleton modefinal keywordabstract classInterfaceSummary
① What is inheritance?
C ...
Posted by wpsd2006 on Wed, 27 Apr 2022 01:25:31 +0300
Java learning notes 7 -- java basic syntax · object-oriented encapsulation, polymorphism and inheritance
object-oriented
Process oriented thinking, which focuses on the steps (i.e. process) involved in an event or activity
Object oriented, the idea of focusing on people or things (that is, objects) involved in an event or activity
Three characteristics of object-oriented:
encapsulationinheritancepolymorphism
Classes and objects
In Java, thin ...
Posted by evilren on Mon, 18 Apr 2022 20:59:42 +0300
Three characteristics of object-oriented ---- encapsulation, inheritance and polymorphism
encapsulation
The dew should be hidden Programming requires "high cohesion and low coupling" High cohesion means that the internal data operation details of the class are completed by themselves, and external interference is not allowed Low coupling means that only a small amount of methods are exposed for external use. Encapsulati ...
Posted by nomad9 on Wed, 30 Mar 2022 00:53:35 +0300
Learning notes on Java programming [Part 3] fundamentals of object-oriented programming
Learning content
3.1 basic concepts of object-oriented 3.2 class 3.3 membership method 3.4 object 3.5 object oriented features 3.6 interface 3.7 package
Learning output
3.1 basic concepts of object-oriented
Object oriented is a programming method, or a programming specification. Its basic idea is to use the basic concepts of object, class ...
Posted by polarbear66 on Sun, 27 Mar 2022 21:48:17 +0300