C++专业术语

SOLID: 

 SRP Single Responsibility Principle  单一责任原则
 OCP The Open Closed Principle  开放封闭原则
 LSP The Liskov Substitution Principle 里氏替换原则
 DIP The Dependency Inversion Principle 依赖倒置原则
 ISP The Interface Segregation Principle 接口分离原则


Polymorphism 多态:  Using child class behavior from base class pointers / use base class pointer to reference or make calls on derived classes

 static and dynamic/  static - function overloaded / dynamic -  virtual operations

Encapsulation 封装:- public/private / "Data Hiding" / "binding data and methods via a class

inheritance 继承:  resusability" 

inheritance vs Composition    "Is-a == inheritance"       "Has-a == data member"

DataStruct:

Array insert  : O(1) using index. Run time would be O(n) / Delete would be similar situation O (n) / Find would be O(n)

Linked list :  insertion is O(n), Deletion O(n), Find O(n) 

Binary Balanced Tree  : Smallest elements in left hand tree.  Largest on right hand side.  Insertion is Nlogn, Delete is Nlogn, Find is O(logn)

Multi-thread:

1. re-entrance 

2. Shared data between  threads can cause data to be corrupted

3. Deadlock : caused by more than two threads and two resources

4.Race condition: use a mutex to lock the critical section to prevent data corruption.

Design Pattern:
solving same problem similar ways.
Readability, reuse, organization, proven

猜你喜欢

转载自www.cnblogs.com/7star/p/12098901.html
今日推荐