Questions tagged [interface]
Object interfaces allow you to create code which specifies which methods a class must implement, without having to define how these methods are handled.
195
questions
0
votes
1
answer
103
views
Functional List in C++ [closed]
This is rather toy example of immutable datatype in C++. I've tried to follow functional languages like Scheme, Racket - making list as a cons cell: list is list or is empty.
...
5
votes
1
answer
202
views
Service for generating faked objects
I'm using the Bogus library to mock up some data for testing.
This is my main method demonstrating how the faking service should be used:
...
1
vote
1
answer
49
views
Proper naming for objects which have a position and bounds on a plane
I have an interface which is for an object which has bounds in a 2D plane.
...
2
votes
1
answer
460
views
Handling related generic type parameters
In answering a question on StackOverflow, it occurred to me that a more generic version of GroupBy for C# that delegated membership in each group to a class could ...
-1
votes
1
answer
71
views
An interface for designing Arduino code [closed]
Writing code could be divided into three parts.
1.Interface structure
At this stage programmer should describe all the devices used in his project. Of course, only those of them which Arduino ...
1
vote
1
answer
2k
views
ChangeCalculator for calculating money denominations in change
I'm doing some exercises in OOP and I just created a program that calculates amounts of denominations in a change at the shop. So, let's say something costs 10, I give 25.30 (for some reason), so I ...
0
votes
3
answers
105
views
"Human" interfaces with two implementation classes
The Helloworld class executes all of the methods. Human is the interface, and Nate & <...
7
votes
1
answer
1k
views
Catching missing attribute errors sooner in Python using strict interface specifications
I use Python daily for long-running simulations (yes, very very optimal, I know). As you could probably guess, my coworkers and I have issues with simulations running for several minutes before ...
0
votes
1
answer
87
views
Using a wrapper on a primitive as a generic for an interface used for Java lambda
I apologize for that title, lol.
I have a Java method that I'm writing where I want to be able to pass in an array of Objects and two interfaces that will be used for lambda expressions that specify ...
2
votes
1
answer
3k
views
Implementation of generic unordered list in java
This question is a follow-up question of this question. These features are added to the new class -
Generic class
User is capable of setting the size
...
4
votes
1
answer
225
views
Designing the constructor interface for a reflection object (any class)
I am working on cleaning up and making open source a C++ reflection library that has served me well over the last few years.
One of the most important classes of the library is ...
5
votes
1
answer
2k
views
Processor for handling generic commands
I'm trying to implement business logic layer based on concepts of commands and command handlers.
A command is a thing that contains input parameters for executing some action, and it knows what kind ...
4
votes
1
answer
819
views
C++ implementation of the decorator pattern
This is a C++ implementation of the decorator pattern. I am also learning about interfaces and (pure) virtual functions.
...
1
vote
1
answer
2k
views
Templatized Object Pool in C++
I'm following Robert Nystroms example to try and implement a decent object pool for my next couple of C++ based games. My version is templatized to allow arbitrary classes to be pooled.
I'm asking ...
1
vote
1
answer
1k
views
PHP OOP API Class
I want to do an API or contract in Laravel focus when one person wants a contract or credit, but honestly it's for a scholarship but the process it's similar when I got a credit from a bank. Honestly ...