using System.Collections.Generic;
namespace FlagInformationSystem
public Flag(string country, string ratio, int yearCurrentFlag, string colors, long gdp, long population, DateTime dateOfIndependence)
YearCurrentFlag = yearCurrentFlag;
DateOfIndependence = dateOfIndependence;
public Flag(string country, string ratio, int yearCurrentFlag, string colors, long gdp, long population, DateTime dateOfIndependence, Guid guid)
: this(country, ratio, yearCurrentFlag, colors, gdp, population, dateOfIndependence)
: this(other.Country, other.Ratio, other.YearCurrentFlag, other.Colors, other.GDP, other.Population, other.DateOfIndependence)
Console.WriteLine($"Id = {Guid}");
Console.WriteLine($"The flag of {Country}, a {ModernCountryAge} year old country with a GDP per capita of around ${CalculateGDPCapita()}, has a ratio of {Ratio}; the current iteration being made in {YearCurrentFlag}. It uses the colours {Colors}.");
public double CalculateGDPCapita()
if (Population == 0) return 0;
public string Country { get; set; }
public string Ratio { get; set; }
public int YearCurrentFlag { get; set; }
public string Colors { get; set; }
public long GDP { get; set; }
public long Population { get; set; }
public DateTime DateOfIndependence { get; }
public int ModernCountryAge
return (int)(DateTime.Today - DateOfIndependence).TotalDays / 365;
public Guid Guid { get; }
static void Main(string[] args)
List<Flag> flags = new List<Flag>();
var switzerland = new Flag("Switzerland", "1:1", 1841, "Red and White", 705100000000, 8545000, DateTime.Parse("9/12/1848"));
var germany = new Flag("Germany", "3:5", 1949, "Red, Yellow and Black", 3948000000000, 83020000, DateTime.Parse("10/3/1990"));
var japan = new Flag("Japan", "2:3", 1999, "Red and White", 4971000000000, 126500000, DateTime.Parse("5/3/1947"));
var russia = new Flag("Russia", "2:3", 1700, "Red, Blue and White", 1658000000000, 144500000, DateTime.Parse("12/12/1993"));
var russia2 = new Flag(russia);
for (int i = 0; i < flags.Count; i++)