Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Assign each data structure to at least one scenario: Explain: 1. why you chose t

ID: 3576454 • Letter: A

Question

Assign each data structure to at least one scenario: Explain:

1. why you chose the data structure.

2. whether you would use java's implementation of the data structure.

3. describe why the data structure is the best for efficiency.

Scenerio 4: Prof. A, Prof B, Prof C, and Prof D each handle grading their students differently. Prof A grades each paper in the order that it was given to her. Prof B grades each paper based on which paper is at the top of her mailbox at the time. Prof C grades each paper alphabetically. Prof D grades each paper based on each student's previous grade (lowest grades first). Assignments are collected on one day, graded the next day, and returned on the third day. Name the best data structure to handle the ordering for each professor. Explain your choice of data structure for each professor. Note: You may choose a different data structure for each professor. Would your answer change if assignments could come in over the course of days and are graded once a day? Why or why not?

Explanation / Answer

Professor A
FIFO => Queue, you can use the Java implementation.

Professor B
LIFO => Stack, you can use the Java implementation.

Professor C
LinkedList, you can use the java implementation, but you should extend it to provide information about the comparable (that is, name).

Professor D
LinkedList, you can use the java implementation, but you should extend it to provide information about the comparable (that is, previous grade).

The answers do not change in the other situation because these structures are efficient regardless of size and functionality of operation