Your class diagram:
i see x violations:
- Favor Composition Over Inheritance
- Program To An Interface, Not An Implementation
- Software Entities Should Be Open For Extension, Yet Closed For Modification
- etc
So, i would suggest you use Abstract Factory pattern. Code:
class Test
{
static void Main(string[] args)
{
IEducationFactory india = new IndianEducation();
IEducationFactory newYork = new USEducation();
IDiplom d1 = india.Create_BSC();
IDiplom d2 = newYork.Create_MBA();
}
}
public interface IDiplom
{
}
public interface IEducationFactory
{
IDiplom Create_MBA();
IDiplom Create_BSC();
}
public class IndianEducation : IEducationFactory
{
public IDiplom Create_MBA()
{
throw new NotImplementedException();
}
public IDiplom Create_BSC()
{
throw new NotImplementedException();
}
}
public class USEducation : IEducationFactory
{
public IDiplom Create_MBA()
{
throw new NotImplementedException();
}
public IDiplom Create_BSC()
{
throw new NotImplementedException();
}
}
And, your class diagram looks like: