Question: 1) Write a C# class named Car with three attributes: color, model and year. Implement necessary constructors and getters/setters. 2) Create five Car objects and

1) Write a C# class named Car with three attributes: color, model and year. Implement necessary constructors and getters/setters.

2) Create five Car objects and store them in an ArrayList. Using the foreach loop to have each Car object in the ArrayList print its model.

3) Create five Car objects and store them in a Queue. Use a loop to have each Car object in the Queue print its color (dequeue the objects one at a time).

Please provide the names of each coding file too (such car.cs or program.cs)

Please send me the screenshots of the final result too.

Thank you

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!