public static Vorm getobject(string typeofobj) { Vorm obj = null; if (typeofobj.ToLower() == "cirkel") { obj = new Cirkel(); } else if (typeofobj.ToLower() == "vierkant") { obj = new Vierkant(); } else if (typeofobj.ToLower() == "rechthoek") { obj = new Rechthoek(); } else if (typeofobj.ToLower() == "trapezium") { obj = new Trapezium(); } else { obj = new Parrallelogram(); } return(obj); }
public PropertyChangedActie(Vorm Vorm, string PropertyName, object OldValue, object NewValue) : base(new Vorm[] { Vorm }) { propertyName = PropertyName; oldValue = OldValue; newValue = NewValue; Beschrijving = string.Format("Change {0} from {1} to {2}", PropertyName, OldValue, NewValue); }
static void Main(string[] args) { Console.WriteLine("Geef uw figuur in Cirkel/Vierkant/Rechthoek/Trapezium/Parrallelogram"); string type = Console.ReadLine(); Vorm obj = CreateVorm.getobject(type); Console.WriteLine(obj.Teken()); Console.ReadLine(); }
public Pizza(int id, string naam, int oppervlakte, bool standaardpizza, int korting, Vorm vorm) : base(id, naam) { Oppervlakte = oppervlakte; Standaardpizza = standaardpizza; Korting = korting; Vorm = vorm; // Ingredienten = repo.get; }