Using C# I have to match the given output with the help of this code.
-----------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------
class Gem
{
public string Name { get; }
public double Price { get; }
public double Hardness { get; }
public string Description { get; }
public string Location { get; }
//public string Formula { get; }
public Gem(string name, double price, double hardness,
string description, string location)
{
Name = name; Price = price; Hardness= hardness;
Location = Location; Description = Description;
}
public static List<Gem> GetList()
=> new List<Gem>
{
new Gem("Tanzanite", 1_200, 6.5, "", "Northern Tanzania"),
new Gem("Jeremejevite", 2_000, 7.0, "An aluminum bearing borate mineral with associated fluoride and hydroxide", "Adun-Chilon Mountains in Siberia"),
new Gem("Fire Opal", 2_300, 5.75, "A hydrated form of silica", ""),
new Gem("Poudretteite ", 3_000, 5, "", "Mont St. Hilaire Quebec, Canada"),
new Gem("Benitoite", 4_000, 6.25, "Barium, titanium, and silica", "San Benito, California"),
new Gem("Musgravite", 6_000, 8.25, "An aluminum oxide with variable proportions of magnesium, iron, and zinc", "Musgrave Ranges, Australia"),
new Gem("Red Beryl", 10_000, 7.75, "Beryllium, aluminum, and silicate", "Thomas Range, Utah"),
new Gem("Alexandrite ", 12_000,8.5, "A type of chrysoberyl", "Ural Mountains, Russia"),
new Gem("Diamond", 15_000, 10, "Pure carbon arranged in a diamond lattice", ""),
new Gem("Serendibite", 18_000, 6.75, "Silicate mineral", "Mogok area of Myanmar"),
new Gem("Grandidierite", 20_000, 7.5, "", "Madagascar "),
new Gem("Taaffeite", 35_000, 8.25, "0", "Alluvial deposits within Sri Lanka and Tanzania"),
new Gem("Blue Diamond", 3_930_000, 10, "", ""),
new Gem("Jadeite", 3_000_000, 7, "", ""),
new Gem("Pink Diamond", 1_190_000, 10, "", ""),
new Gem("Emerald", 305_000, 8, "", ""),
new Gem("Ruby", 1_180_000, 8, "", ""),
new Gem("Red Diamond", 1_000_000, 10, "", "")
};
}
-----------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------