Question: PLEASE WRITE IN ECLIPSE! 1 import java.util.Scanner; Problem Statement ohn wants to buy the costliest gifts for all the kids during the Christmas party. The

PLEASE WRITE IN ECLIPSE!
PLEASE WRITE IN ECLIPSE! 1 import java.util.Scanner; Problem Statement ohn wants to
buy the costliest gifts for all the kids during the Christmas party.
The stock availability of gifts in the store and the number of

1 import java.util.Scanner; Problem Statement ohn wants to buy the costliest gifts for all the kids during the Christmas party. The stock availability of gifts in the store and the number of kids are given. Write a program to print the amount required to buy the gifts. Print 0 if enough stock doesn't exist. Please note John can buy any one of the gifts not a combination gifts. That means the same gifts have to be given to all the kids Input Format: First-line contains the number of kids ' N ' and the second line contains the gift stock availability details ' S ' in the format giftname:price:quantityavailable separated by a comma. Reading these two inputs from the standard input stream is already provided. Output Format: Print the amount required by John to buy the most expensive gift. Print 0 if there isn't enough stock(i.e. Quantity Available of each gift

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 Databases Questions!