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.

4 votes
2 answers
276 views

I'm working on a game with unity, and I've created a state manager for the in-game state of certain organisms. Each state implements a ISimpleStateManager interface,...
Abdul Ahmad's user avatar
20 votes
5 answers
4k views

I've been working through the book Head First C# and this is an exercise from chapter 7, which is about interfaces and abstract classes. Note that the class design was mandated by the authors, I'm ...
Phrancis's user avatar
  • 20.5k
6 votes
1 answer
2k views

An app has a feature that's much like any calendar application (like the Outlook calendar for example). Consequently, I need to do a lot of date logic. I wrote a class with date calculation methods ...
user2190492's user avatar
2 votes
1 answer
122 views

I'm gradually writing an arbitrary-precision arithmetic library for C++. I've decided it could be useful to have the default constructor produce an object of indeterminate value, rather than relying ...
saxbophone's user avatar
7 votes
4 answers
1k views

As per tutorial here, I have the following classes: (In reference to this tutorial's section) ...
taylorswiftfan's user avatar
1 vote
1 answer
141 views

I have an exercise requires me to write a service to management menu. The requirement like this: Food menu includes: breakfast menu, lunch menu, dinner menu. The three menu haves list menu item( name, ...
David Moore's user avatar
5 votes
2 answers
523 views

I have a requirement to fetch data for different types of Users (Customers, Publishers etc) for three different timelines (retro, current, and past), all have different URLs. There is a scheduler ...
Pankaj's user avatar
  • 151
-1 votes
2 answers
225 views

I'm starting an object orientated game engine in Java. My plans for the engine is to be able to split things easily into multi-core loads. My idea is that a Unique (interface with a ...
tuskiomi's user avatar
  • 189
4 votes
0 answers
147 views

I am trying to become better at designing classes for dependency injection and IOC in general. It is often not an intuitive concept. I have the following python interface and implementation for a ...
Patrick Christie's user avatar
8 votes
7 answers
3k views

I need a generic data structure that ensures that its elements are unique. C# has HashSet<T>, great! As it turns out, the elements have to stay in the order ...
I'll add comments tomorrow's user avatar
4 votes
0 answers
120 views

I have a requirement to essentially scan a filesystem on any kind of filesystem and move a resource whenever it is ready. To do this I have the following code ...
Patrick Christie's user avatar
18 votes
2 answers
4k views

Introduction Because of the limitation of VBA in using events in interfaces I was searching for a kind of workaround. For sure I also read this which also provides an approach, but I was searching for ...
AHeyne's user avatar
  • 428
4 votes
1 answer
2k views

I am working on a finite element (FE) code and want to provide multiple material models (20+). In FE applications, the computational domain is subdivided into a set of geometrically simple elements, e....
StefanKssmr's user avatar
3 votes
1 answer
219 views

Here is my take at a lightweight interface implementation, where I focus on discoverability of suitable classes from strings (for simplicity, class name is used as an id). Each interface has it's own &...
Roman Susi's user avatar
1 vote
1 answer
133 views

I'm creating a tool to analyze a card game which is played by three players. A Card is associated with a number of points and looks like this: ...
user253872's user avatar

15 30 50 per page
1
2 3 4 5
13