Immutables in C++: Language Foundation for Functional Programming

Author(s):  
Zoltán Porkoláb

This paper presents two new conceptual relationships between classes of software development known as dependency and association. The design between the two relationships could be interchangeable because it always takes place in real-life situations — for instance, the relationship from friends to husband-wife and vice versa. However, in terms of coding, the most important factor is system performance. That means the designer could write the code as dependency or association to provide the same result. To improve the efficiency of the program, the researcher writes the code in the C++ language to execute four types of variables named messages, strings, calculation, and sorting. The four types of the variable used to test the performance of aggregation, composition, dependency, and functional programming, the timestamp was used to measure the execution time before and after for each case 50 times. The F-test statistic was used to compare the mean difference of each type of variable. The researcher found that for the Message variable. The functional programming is the fastest, followed by aggregation, composition, and dependency, the average C.P.U. time are 13566.60, 17891.70, 18532.66 and 19336.76, at 0.0 level of significance. For the String variable found that functional programming is the fastest followed by dependency, composition, and aggregation, the average C.P.U. time are 23785.88, 27449.76, 28478.24 and 28788.18, at 0.0 level of significance. For calculation found that functional programming is the fastest, followed by aggregation, composition, and dependency, the average C.P.U. time are 26982.68, 29311.86, 29377.50 and 29397.30, at 0.0 level of significance. For sorting found that functional programming is the fastest, followed by aggregation, composition, and dependency, the average C.P.U. time are 17925.20, 18408.36, 21641.68 and 22861.14, at 0.0 level of significance.


Author(s):  
Abiodun Ogunseye ◽  
Daniel Ogheneovo Johnson

A power inverter circuits is normally designed to meet its design specifications when the applied input DC voltage is within specified tolerance limits. Thus, single input inverters are usually specified to work from a DC source having a fixed nominal voltage. This limits the usefulness of the inverter circuit when a DC source having the specified nominal voltage is not available. In this work, a modified square wave inverter system that is specified to work properly from batteries with nominal voltages of 6, 12, 18 and 24 V was designed.  A model of the microcontroller-based circuit was developed with Proteus® software and its firmware was written in C language using the MicroC® development tool. A prototype of the circuit was constructed and then tested.  The constructed circuit was found to work properly by producing a 50 Hz modified square waveform when it was powered from batteries having nominal voltages of 6 V, 12 V, 18 V and 24 V.


Sign in / Sign up

Export Citation Format

Share Document