Question: Observe an array of objects, automobile, shown below with data fields automobiletype, yearOfManufacture and price - and answer the following questions: Automobile[] automobile = {

Observe an array of objects, automobile, shown below with data fields automobiletype, yearOfManufacture and price - and answer the following questions:
Automobile[] automobile = { new Automobile(Toyota, 2008, 6000.0),
new Automobile(Nissan, 1997, 4550.0),
new Automobile(Honda, 2003, 6215.0),
new Automobile(Hyundai, 1998, 3325.0),
new Automobile(Jaguar, 2011, 7250.0)};
Write a LINQ query to filter the range of price of cars between 4000.0 and 6000.0 and in alphabetical order of automobile type.
Write a foreach loop to display the filtered results.
Write C# statement(s) to display the first result obtained in the filtered result, if any.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!