A new class is proposed to collect information about a group of DVDs. A separate class containing information about a single DVD, named DVD, has already been created. Which of the following is the best design to store the data and size of this collection?
A) Have an ArrayList of DVDs and use its size as the size of the collection.
B) Have an ArrayList of DVDs and an integer representing the number of DVDs in the collection.
C) Have an array of DVDs and use its size as the size of the collection.
D) Have a single DVD variable representing the last DVD added and an integer representing the number of DVDs in the collection.
Correct Answer:
Verified
Q43: When are statements in a class-level initialization
Q52: Which of the following constitutes a common
Q53: Which of the following classes has a
Q59: Pre- and postconditions may be viewed as
Q61: Consider the following code snippet: public class
Q62: Can the method lastDayOfMonth be changed to
Q66: A new method, getMonthName, to get the
Q68: A new method, getMonthName, to get the
Q72: A new class is proposed to collect
Q75: A new class is proposed to collect
Unlock this Answer For Free Now!
View this answer and more for free by performing one of the following actions
Scan the QR code to install the App and get 2 free unlocks
Unlock quizzes for free by uploading documents