Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

parts.txt 12345,Left-Handed Bacon Stretcher,125.95,PGH,2 24680,Smoke Shifter,0.98,PGH,48 86420, Pre-dug Post Hole,2.49,ATL,34 25632,Acme Widget,98.29,LOU,342 97531,Anti-Gravity Turbine,895.29,ATL,3 24680,Battery-Powered Battery Charger,252.98,ATL,2 12345,Left-Handed Bacon Stretcher,125.95,LOU,35 97531,Anti-Gravity Turbine,895.29,PHL,8 00000,Glass Hammer,105.90,PGH,8 01020,Inflatable

image text in transcribed

parts.txt

12345,Left-Handed Bacon Stretcher,125.95,PGH,2 24680,Smoke Shifter,0.98,PGH,48 86420, Pre-dug Post Hole,2.49,ATL,34 25632,Acme Widget,98.29,LOU,342 97531,Anti-Gravity Turbine,895.29,ATL,3 24680,Battery-Powered Battery Charger,252.98,ATL,2 12345,Left-Handed Bacon Stretcher,125.95,LOU,35 97531,Anti-Gravity Turbine,895.29,PHL,8 00000,Glass Hammer,105.90,PGH,8 01020,Inflatable Dartboard,32.95,PGH,453 86420, Pre-dug Post Hole, 2.49,LOU,68 86420, Pre-dug Post Hole, 2.49,PGH,124 24680, Battery-Powered Battery Charger, 252.98, PHL, 5

Warehouse.txt

PGH Pittsburgh PA ATL Atlanta GA LOU Louisville KY PHL Philadelphia PA

The objectives of this assignment are to: in experience using the Eelipse IDE; including its environment for managing files. Gain an understanding of input and output of text files. Gain experience in using data structures to hold data in memory. Practice good programming techniques. 1. Ga 2. 3. 4. You have been asked to produce a report showing the inventory of products at various warehouses owned by your company. You will need to create three classes: Prog?, Warehouse, and Part. The report will use two files: parts.txt and warehouse.txt with the formats shown below warehouse.txt file: text file with the following fields separated by spaces: Fields Warehouse ID Cit State Description 3 characters maximum 20 characters 2 characters parts.txt file: CSV (comma separated value) text file in which each line in the file represents a warehouse. The comma delimited fields are: Fields Part Number Descri Price Warehouse ID Description 5 characters maximum 30 characters double 3 characters Integer, quantity at this warehouse Using these files, the program will output a summary report listing the parts in each warehouse and the total number of parts in each warehouse. Note that the parts are to be sorted by price. A sample output is as follows: PGH Pittsburgh, PA Total Number of Parts: 511 Part# Description 24688 Smoke Shifter Price Quantity 01020 Inflatable Dart Board 00000 Glass Hammer 12345 Left-Handed Bacon Stretcher 125.95 8.98 32.95 185.98 48 453 ATL Atlanta, GA Total Number of Parts: 266 Part# Description Price Quantity 86420 Pre-dug Post Hole 2.49 98.29 12345 Left-Handed Bacon Stretcher 125.95 34 248 15 25632 Acme Widget 97531 Anti-Gravity Turbine 895.29

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered 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

Students also viewed these Databases questions