Hello everyone! This is my UML diagram:
When I attempt to generate C# code from it I obtain this one:
Candle.cs:
using System;
public class Candle : ILightningSource {
public String IsOn; // How to tell Visual Paradigm generate auto-implemented property?
private Factory factory;
}
Factory.cs:
using System;
public class Factory {
public ILightningSource Create(ref LightningSourceType productType) {
throw new System.Exception("Not implemented"); // Is is expected to see NotImplementedException instead of general Exception.
}
private Candle candle;
private Lamp lamp;
private LightningSourceType lightningSourceType;
}
ILightningSource.cs
using System;
public interface ILightningSource {
// Where is IsOn property?
}
Lamp.cs:
using System;
public class Lamp : ILightningSource {
public String IsOn;
private Factory factory;
}
LightningSourceType.cs:
using System;
public enum LightningSourceType {
Candle,
Lamp,
}
Are there any my mistakes?.. Formatting is strange.