Question: JAVA Please: As part of a larger programming project, The Gift Card Game, Part 1 ( Exercise 4 ) is the first of three parts

JAVA Please: As part of a larger programming project, "The Gift Card Game," Part 1(Exercise 4) is the first of three parts that will be completed in the next topics. The focus of this segment is to provide the core game logic for the GiftCard and Barrel classes.
Implement the objects from the design documentation.
c.The GiftCard:
iii. A GiftCard has three attributes: a category (with assigned points: Entertainment: 10 points
Restaurant: 10 points
Retail: 5 points
Gas: 5 points
Online Shopping: 3 points
Beauty and Spa: 1 point
Sports: 1 point), a company, and a monetary value.
iv.The GiftCard object will need behaviors to get these attribute values.
d.The Barrel:
v.The Barrel will have an array of GiftCards as its attribute.
vi.There must be a way to point to the top of the Barrel for the next GiftCard.
vii. The Barrel will need to create all the GiftCards, shuffle the GiftCards, and assign the next GiftCard from the Barrel.
viii. The gift cards will be read from a data file called: GiftCardData.txt. This is a CSV file that will be used to create all the gift cards for the project.
Create a test program that will demonstrate that the Barrel can create all the gift cards and allow gift cards to be drawn from the Barrel. Include unit tests for each of the objects as well.
Note: Unit tests may need to use an unshuffled Barrel of gift cards to ensure all the behaviors work properly.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!