Coin Collection Tool Class

0.0(0)
studied byStudied by 0 people
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/8

flashcard set

Earn XP

Description and Tags

Flashcards about the Coin Collection Tool Class to test a student's knowledge.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

9 Terms

1
New cards

What is the purpose of the CoinCollectionTools class?

To assist the Coin Club in organizing and maintaining their coin collection.

2
New cards

What does the CoinCollectionTools constructor do?

It instantiates the coinBox (a 2D array of Coin objects) and fills it with default Coin objects.

3
New cards

What are the parameters of the CoinCollectionTools constructor?

country (String), rows (int), and columns (int).

4
New cards

What precondition must myCoins satisfy for the fillCoinBox method?

myCoins is in order by year and the size of myCoins is not greater than the total number of compartments available.

5
New cards

What is the return value of the fillCoinBox method?

The completed two-dimensional array of Coin objects, coinBox.

6
New cards

What is column-major order?

Filling the 2D array, coinBox, moving down the columns in order until all coin objects have been placed in a compartment.

7
New cards

What are the preconditions for the fillCoinTypeList method?

all cells in coinBox contain a valid Coin object and coinBox is ordered by year in column-major order followed by default Coin objects.

8
New cards

What is the postcondition for fillCoinTypeList method?

Coins in ArrayList are in order grouped by coinType

9
New cards

What should fillCoinTypeList return?

ArrayList of Coin objects