C++ → Example - Factory method in C++
шаблоны проектирования, factory, method, C++
Discussion. Frameworks are applications (or subsystems) with "holes" in them. Each framework specifies the infrastructure, superstructure, and flow of control for its "domain", and the client of the framework may: exercise the framework's default behavior "as is", extend selected pieces …
ReadDesign Patterns → Structural Design Patterns - Bridge
шаблоны проектирования, Bridge, мост
Goals
- Separate the abstraction from its implementation so that they can change independently of each other.
- Create a public interface in an inheritance hierarchy and implement it in your own inheritance hierarchy.
- In addition to encapsulation, the use of isolation …
Projects based on Qt → Reader fb2-files on Qt Creator
reader, читалка, fb2-читалка, html, fb2-reader, fb2
Some time ago I wrote an article in which I showed how to open a fb2 file with Qt tools. After some time, I noticed a number of shortcomings in it, which I decided to eliminate. Moreover, I found that …
ReadDesign Patterns → Structural Design Patterns - Adapter
adapter, шаблоны проектирования
Goals
- Converting a class interface to another interface. An adapter allows classes to work together that might otherwise be due to incompatible class interfaces.
- Wrapping an existing class in a new interface
- Compliance of the old component with the new …
PHP → Example - "Builder" design pattern in PHP
PHP, шаблоны проектирования, Строитель, Builder
In the Builder Pattern a director and a builder work together to build an object. The director controls the building and specifies what parts and variations will go into an object. The builder knows how to assemble the object given …
ReadDelphi → Example - "Builder" design pattern in Delhpi
Builder, Delphi, Строитель, шаблоны проектирования
The functionality used in Delphi's VCL to create forms and components is similar in concept to the builder. Delphi creates forms using a common interface, through Application.CreateForm and through the TForm class constructor. TForm implements a common constructor using the …
ReadDesign Patterns → Generative Design Patterns - Singleton
шаблоны проектирования, Синглетон, singleton
Goals
- Make sure the class has only one instance and provides a global access point to it.
- Encapsulated "initialization at a certain point in time" or "initialization on first use".
Problems
An application needs one and only one object instance. …
ReadDesign Patterns → Generative Design Patterns - Prototype
Prototype, шаблоны проектирования, Прототип, abstract
Goals
- Specify the types of objects to create using the prototype instance and create new objects by copying this prototype.
- Create one instance of the class to use as the source for all future instances.
- The new operator is considered …
Python → Example - "Builder" design pattern in Python
Строитель, Python, Builder, шаблоны проектирования
Example of "Builder" desnig pattern in Python
Read""" Separate the construction of a complex object from its representation so that the same construction process can create different representations. """ import abc class Director: """ Construct an object using the Builder …
C++ → Example - "Builder" design pattern in C++
cpp, Builder, Строитель, шаблоны проектирования
Discussion. The forte of Builder is constructing a complex object step by step. An abstract base class declares the standard construction process, and concrete derived classes define the appropriate implementation for each step of the process. In this example, "distributed …
ReadJava → Example - "Builder" design pattern in Java
Java, шаблоны проектирования, Builder
Example of "Builder" design pattern in Java
Read/* "Product" */ class Pizza { private String dough = ""; private String sauce = ""; private String topping = ""; public void setDough(String dough) { this.dough = dough; } public void setSauce(String …
- Akiv Doros
- Nov. 12, 2024, 3:58 a.m.
C ++ - Test 004. Pointers, Arrays and Loops
- Result:50points,
- Rating points-4
- molni99
- Oct. 26, 2024, 1:37 p.m.
C ++ - Test 004. Pointers, Arrays and Loops
- Result:80points,
- Rating points4
- molni99
- Oct. 26, 2024, 1:29 p.m.
C ++ - Test 004. Pointers, Arrays and Loops
- Result:20points,
- Rating points-10