Answered step by step
Verified Expert Solution
Link Copied!

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Fundamentals Of Database System

Authors: Elmasri Ramez And Navathe Shamkant

7th Edition

978-9332582705

More Books

Students also viewed these Databases questions

Question

How flying airoplane?

Answered: 1 week ago

Question

What are Decision Trees?

Answered: 1 week ago

Question

What is meant by the Term Glass Ceiling?

Answered: 1 week ago