Optimizing Class Structure

Posted by Derek Hammer on Stack Overflow See other posts from Stack Overflow or by Derek Hammer
Published on 2009-02-16T23:05:30Z Indexed on 2010/04/11 1:03 UTC
Read the original article Hit count: 377

Filed under:
|
|

I have the following class structure (abbreviated for sake of time, names changed) in my application. When I was writing the code I felt that the similarities between Action1 and Action2 should warrant some sort of generalization. I've provided the UML Class diagram with the relevant parts (except for the interfaces, which I describe in code below). I was wondering if anyone had an idea on how to make this "better" architecture / class design. Also, actions that are very similar could be implemented in a near-future iteration.

UML Diagram

Code for interfaces

public IActor1
{
    public Property1 { get; set; }
    public Property2 { get; set; }
}

public IActor2
{
    public Property3 { get; set; }
    public Property2 { get; set; }
}

© Stack Overflow or respective owner

Related posts about c#

Related posts about uml