0
I understand arrays pretty well but I am so stuck on where to put it. Everything I enter into the inventory program seems to be in the wrong place or written the wrong way. I am so confused can someone help me? This is the program I have so far, I know how to use arrays but where do I put it? The array has to display the information 1 item at a time including it's number, name, price, inventory and amount in stock. My dad says I have a lot wrong with what I've got anyways.
//Fig.2.7:Inventory.java //Inventory program public class Inventory { //main method begins execution of Java application public static void main(String[] args) { //create User to obtain input Scanner input = new Scanner; java.util; ( System.in ); public class DataVideoDisk { name1 String productName; int number1 String productNumber; int number2 String productStockAmount; int number3 String productPrice; int amount String stockValue; } //end class Data video disk name1 // product name int number1; // product number int number2; // product stock amount int number3; // product price int amount; // stock value; amount of number2 multiplied by number3 public class While { System.out.print( “Enter product name: ” ); //prompt ( name1 = input.nextName1(); read name from user) System.out.print( “Product number: ###-##-###: “ ); //prompt number1 = outputNextInt(); display number1) System.out.print( “Product stock amount: “ ); //prompt number2 = outputNextInt(); display product stock amount) System.out.print( “Product price: $##.##: “ ); //prompt number3 = outputNextInt(); display product price) amount = number2 * number3; // multiply numbers System.out.print( “Stock value is $d/n “ , amount); display amount) } // end class Inventory