public static void Main()
Organization.PrintUnicefInfo();
Organization organization1 = new Organization("BJK", 500, 2001, 4000.5, new Founder("Maria", 40, "Italian"), StructureOfOrganization.Projectized);
Console.WriteLine(organization1.PrintOrganizationInfo());
Organization organization2 = new Organization("OOH", 55680, 1945, 5062548.67, new Founder("Pesho", "American"));
Console.WriteLine(organization2.PrintOrganizationInfo());
public class Organization
string organizationName = null;
StructureOfOrganization structure;
private static Organization Unicef = new Organization("Unicef", 120, 1980, 54264.385, new Founder("Ivan", 50, "Bulgarian"), StructureOfOrganization.Functional);
public Organization(string organizationName, int numberOfStaf, int yearOfCreation, double budget)
this.OrganizationName = organizationName;
this.NumberOfStaf = numberOfStaf;
this.YearOfCreation = yearOfCreation;
public Organization(string organizationName, int numberOfStaf, int yearOfCreation, double budget, Founder founder)
this.OrganizationName = organizationName;
this.NumberOfStaf = numberOfStaf;
this.YearOfCreation = yearOfCreation;
public Organization(string organizationName, int numberOfStaf, int yearOfCreation, double budget, Founder founder, StructureOfOrganization structure)
this.OrganizationName = organizationName;
this.NumberOfStaf = numberOfStaf;
this.YearOfCreation = yearOfCreation;
this.Structure = structure;
public string OrganizationName
get { return this.organizationName; }
if(string.IsNullOrWhiteSpace(value))
throw new ArgumentException("Invalid Argument: The organization name can't be null or white space.");
this.organizationName = value;
get { return this.numberOfStaf; }
throw new ArgumentException("Invalid Argument: The number of staf shouldn't be a negative number.");
this.numberOfStaf = value;
public int YearOfCreation
get { return this.yearOfCreation; }
throw new ArgumentException("Invalid Argument: The year of creation shouldn't be a negative number.");
this.yearOfCreation = value;
get { return this.budget; }
throw new ArgumentException("Invalid Argument: The budget shouldn't be a negative number.");
get { return this.founder; }
throw new ArgumentException("Founder shouldn't be null.");
public StructureOfOrganization Structure
get { return this.structure; }
if (value == StructureOfOrganization.Unknown)
throw new ArgumentException("Structure shouldn't be 'Unknown'.");
public static void PrintUnicefInfo()
Console.WriteLine("--------------Info for Unicef-------------");
Console.WriteLine("Name: {0} \nNumber of staf: {1} \nYear of creation: {2} \nBudget: {3}",
Organization.Unicef.OrganizationName, Organization.Unicef.NumberOfStaf, Organization.Unicef.YearOfCreation, Organization.Unicef.Budget);
Console.WriteLine("Strucrute: {0}", Organization.Unicef.Structure);
Console.WriteLine("\n-----Info for the founder of Unicef------\n");
Console.WriteLine(Organization.Unicef.Founder.GetFounderInfo());
public string PrintOrganizationInfo()
string result = "\n----------Info for Organisation----------\n";
result += "\nName: " + this.OrganizationName;
result += "\nNumber of staf: " + this.NumberOfStaf;
result += "\nYear of creation: " + this.YearOfCreation;
result += "\nBudget: " + this.Budget;
result += "\nStructure: " + this.Structure;
result += "\n\n-------Info for the founder of " + this.OrganizationName + "-------\n\n";
result += this.Founder.GetFounderInfo();
string founderName = null;
string nationality = null;
public Founder(string founderName, string nationality)
this.FounderName = founderName;
this.Nationality = nationality;
public Founder(string founderName, int age, string nationality)
this.FounderName = founderName;
this.Nationality = nationality;
public string FounderName
get { return this.founderName; }
if(string.IsNullOrWhiteSpace(value))
throw new ArgumentException("Invalid Argument: The founder name can't be null or white space.");
this.founderName = value;
throw new ArgumentException("Invalid Argument: The age shouldn't be a negative number.");
public string Nationality
get { return this.nationality; }
if(string.IsNullOrWhiteSpace(value))
throw new ArgumentException("Invalid Argument: The nationality can't be null or white space.");
this.nationality = value;
public string GetFounderInfo()
string result = string.Format("Name: {0} \nAge: {1} \nNationality: {2}", this.FounderName, this.Age, this.Nationality);
public enum StructureOfOrganization