Object interfaces allow you to create code which specifies which methods a class must implement, without having to define how these methods are handled.
3
votes
1answer
78 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:
...
1
vote
0answers
94 views
Generic Task Blocking Queue
A generic blocking queue has the following properties:
It is thread-safe.
It allows queuing and de-queuing of items of a certain type (T).
If a de-queue operation is performed and the ...
0
votes
2answers
94 views
Singleton interface in Java
I've created a singleton by means of an interface. I don't want to make a thing with getInstance() etc because I don't care about inheritance, and it's redundant and non-declarative.
Are there ...
7
votes
1answer
83 views
Interface using for decoupling
I am studying about how to use interface for decoupling. As I studied I wrote a program. I am pasting my code below. Does my program actually implemented decoupling ?. Is there any modification to ...
1
vote
4answers
137 views
Understanding Interface
//program.cs
class Program
{
static void Main(string[] args)
{
Dog oDog = new Dog();
Console.WriteLine(oDog.Cry());
Cat oCat = new Cat();
...
2
votes
0answers
70 views
jQuery plugin boilerplate jquib - critics please
Inspired by jqueryboilerplate.com I extended their boilerplate to fit my needs. Comming from the PHP development I wanted to have good starting point for writing jQuery plugins with a defined ...
4
votes
3answers
288 views
Is this interface too “god-like?”
I have an MVC framework I've written. I'm trying to abstract out ASP.Net specific bits as well as make it more testable. Previously, I relied on HttpContext.Current in many places, which proves to be ...
3
votes
3answers
102 views
Test Driving Interface Design
I have been doing TDD since I have started my first job out of university (about 5 months ago), most of which is working with legacy code. I started a personal project today and thought I would TDD ...
2
votes
1answer
147 views
Have I implemented the command pattern correctly?
This is my command interface
public interface IConverter {
void convert();
}
This is my Receiver class
public class Ogg extends Audio{
private File src;
private File trgt;
...
1
vote
2answers
251 views
What design pattern to use on this case
I have this code that converts audio to different file formats.
import java.io.File;
import it.sauronsoftware.jave.AudioAttributes;
import it.sauronsoftware.jave.Encoder;
import ...
