Modify the application of Figs. 7.117.13 to use Face and Suit enum types to represent the faces
Question:
Modify the application of Figs. 7.11–7.13 to use Face and Suit enum types to represent the faces and suits of the cards. Declare each of these enum types as a public type in its own source-code file. Each Card should have a Face and a Suit instance variable. These should be initialized by the Card constructor. In class DeckOfCards, create an array of Faces that’s initialized with the names of the constants in the Face enum type and an array of Suits that’s initialized with the names of the constants in the Suit enum type.
Fig. 7.11
Fig. 7.12
Fig. 7.13
Fantastic news! We've Found the answer you've been seeking!
Step by Step Answer:
Related Book For
Java How To Program Late Objects Version
ISBN: 9780136123712
8th Edition
Authors: Paul Deitel, Deitel & Associates
Question Posted: