Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

Assignment

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[ ])

Name: Anonymous 2013-03-06 23:08

bet you guys can't help me with making this program
You win.

Name: Anonymous 2013-03-06 23:26

>public static void

i like how weighty it sounds

also the task is stupid, why don't you just create an array of instances of class item which have those variables

Name: Anonymous 2013-03-06 23:38

>>3
Don't you just love it? PUBLIC STATIC VOID MAIN. It's like an incantation to the gods of Cobol. Doesn't Java throw an error if you have a main that isn't PUBLIC STATIC VOID?

Name: Anonymous 2013-03-06 23:50

>>1
read SICP

Name: Anonymous 2013-03-07 3:11

pubic static int numberOfBalls = 2;

Name: Anonymous 2013-03-07 3:26

bet you guys can't help me with making this program
damn right

Name: Anonymous 2013-03-07 3:44

>>7
Seconded.

Name: Anonymous 2013-03-07 19:15

This board is fucking useless. Die in a fire you idiots.

Name: Anonymous 2013-03-07 19:37

U win the bet, OP

Name: Anonymous 2013-03-07 19:47

>>8
Did we ever stand a chance?

Name: Anonymous 2013-03-07 20:46

>>11
Sometimes I help people with their homework here, if it's not too much like a hello world level of problem.

>>1 could have solved this in 1 minute(s) if he had tried, so no such luck. Maybe if professors gave more interesting assignments....

Name: Anonymous 2013-03-07 21:08

anyway i wouldn't trust a teacher who teach you to make inventory that way. what if you want to drop an item on the floor, you need other 3 'parallel' arrays to write those variables + 4th to write down item's coordinates or what. it will be such a mess. it should be done with class item because the object which you manipulate it's item

Name: Anonymous 2013-03-07 22:58

>>1
No, we will not help you implement a shitty half ass non-relational database. Your teacher is mentally diseased and should be tasked for spreading his affliction to others like yourself.

Don't change these.
Name: Email:
Entire Thread Thread List