PRO192c_-_SU_2024_-_TE2_2584.webp
vanbinh99

PRO192c_-_SU_2024_-_TE2_2584.webp

Kizspy | Question: 43 (Choose 1 answer)
You are working on an application that simulates a deck of playing cards. Explain how you would use Java collections to represent the deck, ensuring that cards are efficiently shuffled, drawn, and replaced. Discuss the choice of collection type and any considerations for card removal and addition.
A. Utilize an ArrayList<Card> for easy manipulation and shuffling.
B. Design a custom Deck class with a circular linked list for efficient cycling.
C. Use a HashSet<Card> for unique card storage.
D. Implement a TreeSet<Card> for sorted card ordering.
E. Choose a PriorityQueue<Card> for card prioritization based on rank.
F. Utilize a custom CardDeck class with an embedded array for control over addition and removal.

Thông tin

Category
PRO192
Thêm bởi
vanbinh99
Ngày thêm
Lượt xem
1,777
Lượt bình luận
8
Rating
0.00 star(s) 0 đánh giá

Share this media

Back
Bên trên Bottom