Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In c++ This program assumes that a company has warehouses in 5 cities: New York, Los Angeles uses in 5 cities: New York, Los Angeles,

image text in transcribed In c++
image text in transcribed
This program assumes that a company has warehouses in 5 cities: New York, Los Angeles uses in 5 cities: New York, Los Angeles, Miami, ouston, and Chicago. In each warehouse the each item currently in each warehouse. company stocks three items. A record contains the amount The record should contain an array of 5 warehouses with the name of each warehouse and an array of 3 items with the amount that is currently in stock in the warehouse. Initially the warehouses are empty. Read in a card containing the three prices of the three items. Then read in cards which may be any one of two types: 1. Shipment cards containing... S city amt2 amt3 This data represents a shipment to a given city of amti of item1, amt2 of item2, and amt3 of item3. 2. Order cards containing... O city amt1 amt2 amt3 This data represents an order in a given city of the respective amounts of the various items. 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 city1 city1 amt1 amt2 amt3 10% extra is to be charged for any item shipped from one city to another. If no single warehouse has enough extra to fill the order for a particular item, print out Order Unfilled However any shipments of the previous items remain in effect. In either case print out the adjusted. city amt1 amt2 amt And if the order if filled print.. Price of Order: Price

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

Step: 3

blur-text-image

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

Database Security

Authors: Alfred Basta, Melissa Zgola

1st Edition

1435453905, 978-1435453906

Students also viewed these Databases questions

Question

How do Dimensional Database Models differ from Relational Models?

Answered: 1 week ago

Question

What type of processing do Relational Databases support?

Answered: 1 week ago

Question

Describe several aggregation operators.

Answered: 1 week ago