/// <summary> /// Initializes a new instance of the <see cref="CensusDAO"/> class. /// </summary> /// <param name="unitedStatesCensus">Instance Of USCensus POCO</param> public CensusDAO(USCensus unitedStatesCensus) { this.StateCode = unitedStatesCensus.StateId; this.State = unitedStatesCensus.State; this.Population = unitedStatesCensus.Population; this.AreaInSqKm = unitedStatesCensus.TotalArea; this.PopulationDensity = unitedStatesCensus.PopulationDensity; this.HousingDensity = unitedStatesCensus.HousingDensity; this.LandArea = unitedStatesCensus.LandArea; this.WaterArea = unitedStatesCensus.WaterArea; this.HousingUnits = unitedStatesCensus.HousingUnits; }
/// <summary> /// Description: Return Most Populous State Among Two. /// </summary> /// <param name="indianCensus">Instance Of IndianCensus POCO</param> /// <param name="unitedStateCensus">Instance Of USCensus POCO</param> /// <returns>State Name</returns> public string GetMostPopulousState(IndianCensus indianCensus, USCensus unitedStateCensus) { return(indianCensus.DensityPerSqKm > unitedStateCensus.PopulationDensity ? indianCensus.State : unitedStateCensus.State); }