Skip to main content

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.

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. ...
Robert Hanigan's user avatar
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: ...
TomSelleck's user avatar
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. ...
Adam Arold's user avatar
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 ...
NetMage's user avatar
  • 412
-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 ...
LRDPRDX's user avatar
  • 831
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 ...
mnj's user avatar
  • 155
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 & <...
nate's user avatar
  • 3
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 ...
ktbarrett's user avatar
  • 232
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 ...
Devsman's user avatar
  • 113
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 ...
Hamidur Rahman's user avatar
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 ...
zennehoy's user avatar
  • 143
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 ...
Andre Borges's user avatar
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. ...
user avatar
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 ...
ulfben's user avatar
  • 11
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 ...
herrera2307's user avatar

15 30 50 per page
1 2 3
4
5
13