public static void Main()
Console.WriteLine("Travcorp Tech Test Dotnet");
private static void WriteInstructions()
Console.WriteLine("Instructions");
Console.WriteLine("1) Using System.Text.Json, deserialize DATA to the provided model");
Console.WriteLine("2) Print out each hotel name, star and its rooms (all details) to the console");
Console.WriteLine("3) Format the price to the proper GBP format (eg £1734.00");
Console.WriteLine("4) Format the board basis to the friendly name (eg Half Board, Room Only, All Inclusive)");
Console.WriteLine("5) Order the rooms displayed in each hotel in ascending price order");
Console.WriteLine("6) Order hotels in ascending price order (based off cheapest room)");
Console.WriteLine("7) Display star rating as characters eg *****");
"8) After printing all the information, allow the user to enter either a search term (min 3 characters) and display only hotels that match OR a maximum price and show all hotels + rooms under that price");
internal class HotelModel
public string HotelName { get; set; }
public string HotelImage { get; set; }
public int? Star { get; set; }
public HotelPricing[] Pricing { get; set; }
internal class HotelPricing
public string Board { get; set; }
public float Price { get; set; }
public string RoomName { get; set; }
internal const string DATA = """
"hotelName": "Atlantis The Palm",
"hotelImage": "https://images.destination2.co.uk/Hotels/superid/260809/aa.jpg",
"roomName": "Palm View Standard"
"roomName": "Standard Room"
"hotelName": "Grand Hyatt Dubai",
"hotelImage": "https://images.destination2.co.uk/Hotels/superid/200496/1...jpg",
"roomName": "Resort Room"
"roomName": "Resort Family Room"
"roomName": "Resort Room"
"hotelName": "Centara Mirage Beach Resort Dubai",
"hotelImage": "https://images.destination2.co.uk/Hotels/giata/1248562/hotel.jpg",
"roomName": "King Superior Room"
"roomName": "King Superior Room"
"roomName": "King Superior Room"
"roomName": "King Superior Room"