i would like to get thia code in Java

ASSIGNMENT #2-MORE BEVIEW This program assumes that a company has warehouses in 5 cities: New York, Los Angeles, Mami, Housto

Data Price 2-$7.00 Price 3-$8.50 Price 1-$2.00 s New York Miami Los Angeles 40 Houston s Chicago New York Miami o Los Angeles ASSIGNMENT #2-MORE BEVIEW This program assumes that a company has warehouses in 5 cities: New York, Los Angeles, Mami, Houston, and Chicago. In each warehouse the company stocks three hems. A reoord contains the amount of each Item currently in each warehouse. The record shoald contain an aray of 5 warehouses with the name of each warehouse and an array of the 3 Hems with the amount that is currenty in stock in the warehouse. Initially the warehouses are empty. Read In a card containing the three prices of the three bems. Then read in cards which may be any one of two types:- 1. Shipment cards containin… S city amti amt2 amt3 This data represents a shipment to a given city of amt1 of item1, amt2 of tem2, and amt3 of tem3. 2. Order cards containing clty amt1 amt2 amt3 This data represents an order in a given city of the respective amounts of the varlous Items. RT As each shipment card is read in, print it out, update the amounts in that warehouse and then print on the next line: city amt1 amt2 amt3 As each order card is read in, print it out. If there is enough in stock at that warehouse of each Item, update the amounts. If there is not enough, search the other warehouses for the one which has the most of that particular Item, ship the amount needed from one warehouse to the other, printing out: x of item y shipped from city1 to city2 and amti amt2 amt3 city1 10% extra is to be charged for any item shipped from one city to another. If no single warehouse has enough extra to ill the order for a particular item, print out: bOrder Unfilled However any shipments of the previous items remain in efect. In elther case print out the adjusted… city amti amt2 amt3 And if the order if filled print… Price of Order: Price Data Price 2-$7.00 Price 3-$8.50 Price 1-$2.00 s New York Miami Los Angeles 40 Houston s Chicago New York Miami o Los Angeles 15 New York Houston Chicagoed 20 15 New York 23 14 1 25 17 10 25 25 x 13 30 100 42 S 23 0 19 15 21 0 S 17 10 13 15 12 24 8 75 45 10 15 0 20 30 0 15 Los Angeles 10 s Houston. o New York Chicago s New York o Houstone br 10m20 10 S 0 40 25 15 15 C 40 30 75 20 10 15 20 ns to Binany tee End of data



Source link

Leave a Reply

Your email address will not be published. Required fields are marked *