We’re rewarding the question askers & reputations are being recalculated! Read more.

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.

Filter by
Sorted by
Tagged with
6
votes
1answer
98 views

Generic container similar supporting PeekMax, PeekMin, Sum, and PeekNextToMax

I needed to implement a data structure that supports the following operations: create from an existing collection get the maximum item ("Alpha") get the nearest-to-maximum item ("Beta") get the ...
28
votes
1answer
3k views

Unit Testing in VBA

Unit testing in VBA is... lacking. (What isn't lacking in VBA though?) Since I've become more interested in unit testing lately, I decided I needed something better than ...
11
votes
1answer
7k views

Variadic templates and pointers to member functions to achieve a named-parameters interface in C++

I studied a bit and packed all the suggestions that I received here: Fluent interface and polymorphism for building a scene with shapes and I came up with this: ...
15
votes
2answers
2k views

Using events together with interfaces in VBA

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 ...
7
votes
1answer
13k views

Review of 2d Vector class

I'll keep this short. I've never actually done professional C++. I don't really know any of the 'best practices'. I'd like to get some review on a simple class that I've made. My Vector2d.h file: <...
7
votes
1answer
967 views

UnitOfWork, an excuse for multiple repositories

I needed a way of attaching multiple repositories to a presenter. Given I already had an IRepository abstraction, coming up with an ...
4
votes
2answers
2k views

Automatic IEqualityComparer<T>

There are APIs like the Except extension that require the IEqualityComparer<T> to work. I find it's too much work for such ...
12
votes
2answers
1k views

Implementing Dynamic Network Message Handling

I'm trying to handle network messages in a dynamic, and effective way, though I feel I've overthought it again. As of now, I have a very structured approach, but it feels as if it's a lot of overhead ...
12
votes
2answers
1k views

Instantiating a run-time implementation of an interface

Below is my code that was written for the following task (based on an SO question): Given a Java Collection (of N elements) create an ...
11
votes
1answer
186 views

DataLayer Interfaces Genericized

I have some concerns on my refactoring for the data layer in my current Project. Just for a small info, I am currently building a CRM as "training JEE application". But enough of talk, let's talk code!...
9
votes
5answers
483 views

Declarative type comparer

Writing comparers by either implementing the IEqualityComparer<T> or the IEquatable<T> interface is another boring ...
8
votes
3answers
485 views

Abstracted Interface for Settings

I just learned about the beauties and wonders of interfaces and I realized how I could fix some code that has been bothering me because of its duplication. This is ...
6
votes
2answers
407 views

Some sort of console “notepad”

This is notepad that works with list of files (pages w/e) that can be edited (list). You can access each file separately and edit/view it too (rewrite, append, read). Here's my implementation of it. I ...
5
votes
1answer
61 views

Manage Excel Styles with VBA OOP Approach (Follow up)

This is a follow up to this question Code incorporates Mathieu's comments and it works. As some parts of the review left some code to my knowledge, I ask for another review to see if I implemented ...
5
votes
1answer
50 views

Manage Excel Styles with VBA OOP Approach

I want to manage the Excel Styles in a more flexible way with bulk actions and at the same time improve my newly acquired OOP concepts. Objectives: Load the current Styles list (name and type=...
4
votes
2answers
395 views

User Authentication Bundle

I wrote a user authentication program(s) for an MVC application. Before you ask part of the project specs are I have to store user information in company databases on servers that aren't the web ...
3
votes
1answer
2k views

Classes representing items in an RPG game

I wrote a little program in C# that contains classes representing Items in RPG game. I wanted to have access to all inherited classes parameters from list contains parent Item class instances, so this ...
3
votes
1answer
3k views

DTO interfaces for implementing web service integration

I am trying to define some interfaces to implement some web service integration middleware. The SOA pattern that fits this system is probably the Multi-Channel Endpoint. I expect a lot of mapping of ...
2
votes
1answer
570 views

Ogg audio format conversion classes

This is my command interface: public interface IConverter { void convert(); } This is my Receiver class: ...
2
votes
2answers
828 views

Strategy pattern using an abstract class and an interface

I have implemented some sort of the strategy pattern using an abstract class and an interface: ...
1
vote
1answer
63 views

Interfaces & Factory for generic container supporting PeekMax, PeekMin, Sum, and PeekNextToMax

This is a partial update of this question. An implementation of these interfaces is in this question. To summarize, the class is a generic container similar to MaxHeap, but only needs to support the ...