Answered step by step
Verified Expert Solution
Question
1 Approved Answer
2. Write in Swift code using a dictionary, the cards are the key, value pairs GiftCard[] cards = new GiftCard[4]; cards[0] = new GiftCard(Target,25.0); cards[1]
2. Write in Swift code using a dictionary, the cards are the key, value pairs
GiftCard[] cards = new GiftCard[4];
cards[0] = new GiftCard("Target",25.0);
cards[1] = new GiftCard("Macy's",50.0);
cards[2] = new GiftCard("Walmart",75.0);
cards[3] = new GiftCard("Boscovs",80.0);
for (i = 0; i < numCards; i++)
{System.out.print(cards[i]);
}
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started