Name: Anonymous 2013-03-06 23:02
bet you guys can't help me with making this program
Implement a class named InventoryItemList. The main method declares three arrays of size 10 that are “parallel” – the first element of each array belong together, the second element of each array belong together, etc. The array names are:
itemUPCArray[ ] to store the item upc code (int) – initialize each to 0
itemNameArray[ ] to hold the item name (a String) – initialize each to “None”
itemUnitPrice[ ] to hold the unit price of each item (a double) – initialize each to 0
The main method will prompt the user for the number of inventory items; and then prompt for the item upc, item name, and item unit price.
The class will contain one additional method that will receive the 3 arrays and will display the inventory items as depicted in the sample output.
Sample Run:
How many items in the inventory (max 10)? 3
Item 1:
Item upc: 123
Item Name: Hammer
Unit Price: 12.23
Item 2:
Item upc: 234
Item Name: Wire
Unit Price: 1.22
Item 3:
Item upc: 543
Item Name: Nails
Unit Price: 0.11
Item upc Item Name Unit Price
123 Hammer $12.23
234 Wire $1.22
543 Nails $0.11
0 None $0.00
0 None $0.00
0 None $0.00
0 None $0.00
0 None $0.00
0 None $0.00
0 None $0.00
Thank you!
The program will need to include one additional method outside of the main() method as below:
Method: displayInventoryItems
Signature: public static void displayInventoryItems(int[ ], String[ ], double[ ])
Implement a class named InventoryItemList. The main method declares three arrays of size 10 that are “parallel” – the first element of each array belong together, the second element of each array belong together, etc. The array names are:
itemUPCArray[ ] to store the item upc code (int) – initialize each to 0
itemNameArray[ ] to hold the item name (a String) – initialize each to “None”
itemUnitPrice[ ] to hold the unit price of each item (a double) – initialize each to 0
The main method will prompt the user for the number of inventory items; and then prompt for the item upc, item name, and item unit price.
The class will contain one additional method that will receive the 3 arrays and will display the inventory items as depicted in the sample output.
Sample Run:
How many items in the inventory (max 10)? 3
Item 1:
Item upc: 123
Item Name: Hammer
Unit Price: 12.23
Item 2:
Item upc: 234
Item Name: Wire
Unit Price: 1.22
Item 3:
Item upc: 543
Item Name: Nails
Unit Price: 0.11
Item upc Item Name Unit Price
123 Hammer $12.23
234 Wire $1.22
543 Nails $0.11
0 None $0.00
0 None $0.00
0 None $0.00
0 None $0.00
0 None $0.00
0 None $0.00
0 None $0.00
Thank you!
The program will need to include one additional method outside of the main() method as below:
Method: displayInventoryItems
Signature: public static void displayInventoryItems(int[ ], String[ ], double[ ])