- C#: Cars Management
Given a list of data, implement the following 4 methods using LINQ in a class that allows for managing cars:
MostExpensiveCar- returns the most expensive car in the car list.
CheapestCar- returns the cheapest car in the car list.
AveragePriceOfCars-returns the average price of all cars in the car list. The average price is rounded to the nearest whole number.
MostExpensiveModelForEachBrand- calculates the most expensive car for each unique brand and returns the results as a Dictionary<string, Car> sorted by key, where Key[string] is a unique brand, and Value[Car] is the car with the maximum price in this brand.
Here is the description of the Car class:
Brand [string] - the brand of the car.
• Model [string] - the model of the car.
• Price [int] - the price of the car
Your implementation of the class will be tested by a stubbed code on several input files. The input file contains parameters for the function calls (i.e., the car data). The functions will be called with those parameters, and the result of their executions will be printed to the standard output by the stubbed code.
Sample Input For Custom Testing
12
Audi A6 45447
Audi A5 79105
Cadillac CTS 49772
BMW 5 Series 49198
Mercury Cougar 47560
Audi Q7 52927
Nissan Altima 72154
Nissan Quest 55357
BMW X5 65000
Isuzu Amigo 65135
BMW 7 Series 78000
Pontiac Bonneville 58565
i want the answer can any on answer it