Reference no: EM131267379
Warehouse Inventories
Objective:
Work with multiple objects and review reading data files.
Description: A wholesale distributor has six warehouses (Atlanta, Baltimore, Chicago, Denver, Ely and Fargo) and sells five different items (identified by part number: 102, 215, 410, 525 and 711). Each warehouse may stock any or all of the five items. The company buys and sells these items constantly. Company transaction records contain a transaction code (‘P' for a purchase or ‘S' for a sale) followed by an item number and the quantity (bought or sold).
The transaction records are contained in a transaction data file named Transactions.txt.
Sample transaction records: Transactions.txt
P 410 1000
S 215 120
S 711 300
A separate data file contains the initial status of the six warehouses at the beginning of the day (i.e., the ending status from the night before). This data file has only six records (lines). Each record (line) contains five numbers that show the quantity on hand for the five items in that warehouse. This file is named Inventory.txt.
Sample status data file: Inventory.txt
500 120 60 0 350
100 230 0 50 0
0 75 0 0 220
600 50 120 300 40
210 160 30 80 50
90 50 90 200 70
The status data file is updated by processing the transaction records in the transaction data file according to these rules:
1 - For a sale (‘S') - subtract the quantity sold from the warehouse that has the largest supply of that item on hand.
2 - For a purchase (‘P') - add the quantity purchased to the warehouse that has the lowest supply of that item on hand.
Instructions:
Write an object-oriented Java program to do the above inventory warehouse processing. Each of the six warehouses should be treated as an individual object. For example, Atlanta would be an object with each of the five part numbers as instance fields. Each of the other warehouses should also be objects with the five part numbers as instance fields. Of course, there would be one class which would be the main (driver) class from which these 6 objects would be created.
In the beginning of the program, the status data file (Inventory.txt) should be read and an object for each warehouse created. The Inventory.txt data file is in the following order: the first line is the Atlanta warehouse, the second line is the Baltimore warehouse, third Chicago, then Denver, Ely and Fargo. After the objects are created, the transactions data file (Transactions.txt) are read and processed.
The objects should be updated as the transaction records are read and processed.
The program should:
1 - Display the initial (beginning-of-day) status for all warehouses.
2 - Process each transaction from the transaction data file and show which warehouse's inventory was updated to reflect that transaction.
3 - Display the final (end-of-day) status for all warehouses.
Requirements:
- The class must be named Inventory.
- The main program (driver) must be named Warehouses.
- A driver (main class) as well as a programmer-defined class must be used.
- Submit program through the assignment tool in Moodle2.
- Include a comment stating your name.
- Each student must create his/her own independent program.
Develop the functional evolutionary maps of the markets
: Develop the functional evolutionary maps of the markets and industry in which the company is embedded. Create functional maps (time-based evolutionary maps) for technology, product market, and manufacturing strategy of the firm. These maps will be..
|
Write a paragraph about some notable incidents
: Write a paragraph about some notable incidents and injuries and people in Olympics equestrian events for my presentation. It should include 2 subpoints and also intext sitations. Most importantly, the resources should be from journals instead of o..
|
Describe the role of pricing during periods of inflation
: Describe the role of pricing during periods of inflation and recession.- What pricing strategies would you consider using to gain or maintain market share?
|
Create a strong thesis for your essay
: Create a strong thesis for your essay. A thesis states your main idea in a sentence. A sample thesis (which you are free to use) might be: Charles Alexander Eastman and Sherman Alexie, Jr., both award-winning authors with strong cultural roots, di..
|
Write a java program to do inventory warehouse processing
: Write an object-oriented Java program to do the above inventory warehouse processing. Each of the six warehouses should be treated as an individual object.
|
How did the attacker disrupt the target
: What company, government, organization (or group of them) was the target of the attack - Who was the attacker? If it's not know for certain, what is suspected and why?
|
How does this capacity compare with that of a simo
: Consider a deterministic MISO channel with AWGN in which the elements of the channel vector h satisfy the conditions |hi|2 = 1, i = 1, 2,..., NT .
|
Does the ama statement of ethics address the issue
: Does the AMA Statement of Ethics address this issue? Go to www. marketingpower.com and review the statement.
|
Cyberethics and cyberlaw
: What is meant by the term "Cyberethics and Cyberlaw" in relation to the Internet? Which groups of people are most negatively affected by the Cyberethics and Cyberlaw, and why? What are some of the consequences of the Cyberethics and Cyberlawto bot..
|