Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

You are to write a program to produce a report on the inventory for some warehou

ID: 671513 • Letter: Y

Question

You are to write a program to produce a report on the inventory for some warehouses. The input for this program is found in several files. Each file is maintained by different departments within the company and each department uses a different index to reference the data (i.e. some use Item_Number others use Item_Name). One department uses the concatenation of the Item_Name and Item_Number.

You are to read in the data from the different files, combine all the data, and print out a single report showing the inventory for each warehouse. The input data is WLL1.dat ...WLL2.dat ...WLL3.dat ...WLL4.dat'.

Files Contains the following information:

WLL1.dat            Item_Number Item_Name

WLL2.dat            Item_Number WareHouse_Name

WLL3.dat            Item_Name quanity

WLL4.data         Item_NameItem_Number WholeSale-Price Markup_value

You are to create an array of structures to store Ware House information, sorted by WareHouse and within each warehouse sort by Item_Number. Print out a report for each warehouse.

Output Format: Output information by WareHouse name and by Item-Number is in ascending order.

Ware House Name 1

   Item-Number   Item_Name Quanity    Wholesale Price         MarkUpValue      Retail Value

       1821             Whoseys      10               25.00                             75%                         437.50

       8321             SkyLight       3              150.00                             50%                          675.00

       ...

                                                                                                                Total      XXXX.XX

Ware House Name 2

   Item-Number   Item_Name Quanity    Wholesale Price         MarkUpValue      Retail Value

       1821             Whoseys      10               25.00                             75%                       437.50

       8321             SkyLight       3              150.00                             50%                        675.00

       ...

                                                                                                                Total        XXXX.XX

Requirements:   Your program will use an array of structures to store the information.

Explanation / Answer

class InventoryItem

{

private int itemID;

private int inStock;

public Inventorytem(int identifier)

{

itemID=identifier;

inStock=0;

}

public void recordArrival(int numUnits)

{

inStock=inStock+numUnits;

}

public void recordShipment(int numUnits)

{

inStock=inStock-numUnits;

}

public int numberOfUnits()

{

return inStock;

}

}

class Warehouse

{

public static void main(String args[])

{

InventoryItem stereo=new InventoryItem(40);

stereo.recordArrival(100);

stereo.recordShipment(10);

System.out.println("Item 40: Currently"+stereo.numberOfUnits()+"inStock");

}

}

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote