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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started