Question 1


Question

Multiple Choice

You are developing an rental property web application for RentBin that includes a class named Order. The applicaton will store a collecton of Order objects. The collecton must meet the following requirements:

  1. Use strongly typed members.
  2. Process Order objects in frst-in-frst-out order.
  3. Store values for each Order object.
  4. Use zero-based indices.
You need to use a collecton type that meets the requirements.

Which collecton type should you use?

  • A. Queue<T>
  • B. SortedList
  • C. LinkedList<T>
  • D. Array<T>

Answer:

A
Explanation
Queues are useful for storing messages in the order they were received for sequental processing. Objects stored in a Queue<T>are inserted at one end and removed from the other.