Part II: Creating High-quality codeThe fifth chapter: Design in Software construction"In large projects, the design may be detailed to make coding work almost mechanized""In a small project, a design might refer to an interface that uses pseudo-code
Preface (RIP-_-)Hello everyone, today and you talk about the expansion of the matter, I will take everyone from the simple application began to understand the principle of extension methods, and the use of extension methods to give reasonable
1. Introduce STL and explain in detail how STL implements vector. answer: STL (Standard Template Library) is composed of the algorithm iterator of the container. STL has the following advantages: you can easily search data or Sort data among
After defining the Architecture Vision, all the team members should have a certain understanding of the developed software. But what should we do next in the face of a huge software system? The idea of divide and conquer is a very important idea in
Oriented
Interface Programming(Classic. Reprinted)
Eliminate inheritance and orientation in a rushInterface ProgrammingThese two major problems are not an easy task, especially considering the level of understanding. Frankly speaking, this
1. Introduce STL and explain in detail how STL implements vector.Answer:STL (Standard Template Library) is composed of container algorithm iterators.STL has the following advantages:It is easy to implement a series of algorithms such as searching
JAVA_SE basics -- 39. Inheritance
In object-oriented programming, a new class can be derived from an existing class. This is called inheritance ).
Vernacular explanation:
Example 1: inheritance generally refers to the inheritance of property
The maintainability and reusability of software
Robert C.martin, a well-known software guru, believes that a low-maintainability (maintainability) software design is typically caused by the following 4 reasons:? too stiff (rigidity)? Too
The first feature of object-oriented is encapsulation. Brother learned about encapsulation, encapsulation, and purpose through an example of a Disgusting garbage bag. In summary, encapsulation is to package a bunch of similar things together.
1. Introduce STL and explain in detail how STL implements vector.Answer:STL (standard template library, which is composed of containersAlgorithmAn iterator.STL has the following advantages:It is easy to implement a series of algorithms such as
Many people who have learned C must remember the type conversion in C, for example:
Float floatnum = 1.234;Int intnum = (INT) floatnum;// Intnum = 1
This is a normal type conversion. A slightly risky conversion is as follows:
Float floatnum = 1.234;
Combination and inheritance are both ways to improve code reusability. When designing an object model, you can identify the combination and inheritance relationships between classes according to semantics. In some cases, a combination or inheritance
1. Introduce STL and explain in detail how STL implements vector.Answer:STL (standard template library. It consists of container algorithm iterator.STL has the following advantages:It is easy to implement a series of algorithms such as searching
Define: Define the skeleton of an algorithm in an operation, deferring some steps to subclasses. template method lets subclasses redefine certain steps of an algorithm without changing the algorithm's structure.1. template method mode
Prepare an
Nature of InheritanceInheritance is a highly coupled relationship. Like combination and generalization, it providesIs used to combine different software components. An instance of a class is also of that class.All ancestor instances. To ensure the
Prepare an abstract class, implement part of the logic in the form of a specific method and a specific constructor, and then declare some abstract methods to force the subclass to implement the remaining logic. Different sub-classes can implement
Inheritance is a double-edged sword.Through the previous sections, we should have a better understanding of inheritance, but before we say that inheritance is actually a double-edged sword, why do you say so? On the one hand, inheritance is very
From: http://wxdlut.blog.163.com/blog/static/128770158200992373211377/
Programmers must know: C/C ++ interview questions (7)
1. Introduce STL and explain in detail how STL implements vector.
Answer:
STL (Standard Template Library. It consists of
why use object-oriented programmingbecause object-oriented programming is based on 7 principles, this allows programs written in object-oriented programming to be extensible, maintainable, and reusable, and more flexible. 7 Major principles:(online
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.