?

AP® Computer Science Principles

Free Version

Upgrade subject to access all content

Moderate

Making a List, Checking it Twice

APCSP-E5YQLZ

Wyatt was tasked with writing a program to manage a list. His boss required that the program display the current list and add items to the list at a later time. Which of the following are necessary components in his code?

I.

PROCEDURE sort (list)
{
   // code that returns the list sorted
}

II.

PROCEDURE getList ()
{
   // code that allows user to enter a list of names
   // returns the list
}

III.

REMOVE (list, i)

IV.

APPEND (list, value)

Which of the following are necessary components in his code?

A

I. & III. only.

B

II. and IV. only.

C

I., II., & III only.

D

I., II, III., and IV.