scholarly journals Towards Creating a Static Design Pattern for Double Dispatching Model Signatures

2021 ◽  
Vol 4 ◽  
pp. 64-71
Author(s):  
Volodymyr Boublik

The paper investigates a possibility of developing a non-virtual hierarchy for a special case of class signature, which may possess different interpretations. The approach is similar to double dispatching in the C ++ programming language. As an alternative to polymorphism, a non-polymorphic hierarchy has been suggested based on generic programming templates. This hierarchy is based on inverse parametrization for templates enabling constructing a general scheme for the design pattern. The pattern defined a class architecture suitable for static implementation of double dispatched multimethod for a special case of signature- defined interfaces.In fact, any abstract base class (interface) with purely virtual operations must acquire a polymorphic implementation. Besides, the polymorphism itself, the dependence of a virtual function on two objects – “this” and another parameter – requires the use of double dispatch, turning a class member function into a double dispatched multimethod.A preliminary consideration deals with issues of double dispatching in the C++ programming language. Inheritance with polymorphic class member functions is used. This requires special efforts of adding to both bases and derived classes a couple of virtual functions to support dispatching. In any case, this approach, besides using virtual functions, has a disadvantage of violating one of the SOLID principles, namely the principle of dependency inversion: base classes should not depend on derivatives, which negatively affects the quality of the software.Polymorphism is usually understood as the dynamic tuning of a program to the data type of the object that the program will encounter during its execution. That is, by its nature, polymorphism is a purely dynamic characteristic. However, in C++ literature and in practice, you can come across the term “static polymorphism”.At the same time, research of possibilities of generalized programming (templates) allows transferring some dynamic problems to the static level. In particular, a variant of static polymorphism application without virtual functions can be considered.A variant of non-virtual double scheduling has been proposed, generalized in the form of a created design pattern “Signature multimethod”. The use of the newly created pattern is illustrated with an example of implementing classes of complex numbers. The absence of violations of SOLID principles is shown, and the possibility of supplementing the hierarchy with new derived classes without the need to interfere with the structure of the base class is demonstrated.The approach suggested in this work has been used in courses in object-oriented programming at the Faculty of Informatics of Kyiv-Mohyla Academy.

2021 ◽  
Author(s):  
RAMESH R ◽  
THIRUMARAN S

This book was written for readers those who are interested to learn C++ programming language with easy way and effective to enhance their knowledge of C++. It is the goal of our career beginning to design this text with the capabilities of text book and also reference book.The chapter one gives a thorough description of the basic characteristic of object oriented programming C++ and gives some sample program to the readers.


2019 ◽  
Vol 8 (4) ◽  
pp. 1991-1998

Reusability is one in every of most vital advantage of C++ programming language. C++ categories are often reused in many ways in which. Once the parent (Base) category has been written it are often changed by another technologist to suit their needs. the most plan of inheritance is making new categories, reusing the properties of the present base category. The mechanism of etymologizing a replacement category (Child/Derived Class) from associate Existing category (Base/Parent Class) is termed inheritance. The previous category is stated because the base (Parent) category and therefore the new category is termed the derived category (Child) or taxonomic group. A derived category includes all options of the generic base category so adds qualities specific to the derived category. This paper reflects the learning of the Inheritance conception and its varieties victimization C++ (oops)


2021 ◽  
Vol 27 (5) ◽  
pp. 275-280
Author(s):  
N. M. Kulyashova ◽  

The article is devoted to the problem of recognizing mail addresses from an arbitrary format string. The purpose of the research is a developing software for automatic mail address recognition in two forms: as a library and as a web server. As an approach to development, object-oriented programming paradigm was used. Preference is given to the C# programming language version 8.0 and ASP.NET Core 3.1 and Entity Framework Core 3.1. Address recognition software has been developed. It can be used as a programming library and as a separate web server with open HTTP REST API. The paper substantiates the need to create software for automating the recognition of address structures from a string of arbitrary format. According to the rules for the contruction of addresses, their basic patterns and nuances are analyzed. During development, fundamentally new mail address recognition algorithms were invented in the C# programming language.


2020 ◽  
Vol 30 (3) ◽  
pp. 28-33 ◽  
Author(s):  
S. A. Pryadko ◽  
A. Yu. Troshin ◽  
V. D. Kozlov ◽  
A. E. Ivanov

The article describes various options for speeding up calculations on computer systems. These features are closely related to the architecture of these complexes. The objective of this paper is to provide necessary information when selecting the capability for the speeding process of solving the computation problem. The main features implemented using the following models are described: programming in systems with shared memory, programming in systems with distributed memory, and programming on graphics accelerators (video cards). The basic concept, principles, advantages, and disadvantages of each of the considered programming models are described. All standards for writing programs described in the article can be used both on Linux and Windows operating systems. The required libraries are available and compatible with the C/C++ programming language. The article concludes with recommendations on the use of a particular technology, depending on the type of task to be solved.


Sign in / Sign up

Export Citation Format

Share Document