I need to write a program with seven vectors. The program needs to have methods to input the data into vectors, display a menu to print a report and sell an item, a method to sell an item, and a method to print the report. This is what I have so far. I'm starting to get lost

import java.io.*;
import java.util.*;

public class Ch10_GrpExercise
{
      public static void main (String[] args) throws
                                    FileNotFoundException
{
	
int[] ItmIdList = new int[10];
String[]ItmNmeList = new String[10];
int[]PordrList = new int[10];
int[]InStreList = new int[10];
int[]PSldList = new int[10];
Double[]ManuPrceList = new Double[10];
Double[]SelPrceList = new Double[10];

        Scanner inFile = new Scanner(new
                     FileReader("storeinventory.txt"));      

       	
inputData(inFile, ItmIdList, ItmNmeList, PordrList, InStreList, PSldList, ManuPrceList, SelPrceList);

sortData(ItmIdList, ItmNmeList, PordrList, InStreList, PSldList, ManuPrceList, SelPrceList);

printMenu();
printRpt();
   }
public static void inputData(Scanner input, Vector<Integer> inpID, Vector<String> inpName,
        Vector<Integer> inpOrdered, Vector<Integer> inpInStore,
        Vector<Integer> inpSold, Vector<Double> inpManPrice,
        Vector<Double> inpSellPrice)
	{

	int id;
	String name;
	int order;
	double price, sellPrice;


		while (input.hasNext())
		{
		id = input.nextInt();
		name = input.nextLine();
		order = input.nextInt();
		price = input.nextDouble();
		sellPrice = input.nextDouble();

		inpID.addElement(new Integer(id));
		inpName.addElement(name);
		inpOrdered.addElement(new Integer(order));
		inpInStore.addElement(new Integer(order));
		inpSold.addElement(new Integer(0));
		inpManPrice.addElement(new Double(price));
		inpSellPrice.addElement(new Double(sellPrice));
		}
	}


public static void printMenu()
{
int number;
int index;

	System.out.println("Welcome to the Friendly Hardware Store");
	System.out.println("To view our available items and their quantity, press 1");
		number = console.nextint();
		
		if (number = 2)
		 for (index = 0; index< inpName.length; index++)
		 System.out.print(" here is a current lisiting of items :" +inpName[index])
		 
		else
		System.out.println();
	
	System.out.println("To sell an item, press 3");
	
	
	System.out.println("To print a report, press 4");
}


// method to sell and item
public static void sellItem()
{
int item;
string name;
int sold;
int store;

System.out.println ("Enter item number: ");
int item = console.nextInt();

System.out.println ("Enter the item name: ");
String name = console.next();

System.out.println ("Enter quantity sold: ");
int sold = console.nextInt();

public int indexOf(Object item)


  // method to print out the report
public static void printRpt()
{
int[]ItemID;
String[] ItemName;
int[]pOrdered;
int[]pinStore;
int[] pSold;
int i,j;
double manufPrice, sellingPrice;
double totInventory;
int totitems = 0;
int totinstore = 0;

system.out.println("--------------------Friendly Hardware Store"
+ "--------------------\n");
system.out.println ("ItemID " + "  ItemName         " + "pOrdered "
+ " pinStore  " + " pSold " + " manufPrice  " + " sellingPrice  ")

   System.out.printf(itemID[], ItemName[], pOrdered[],
		pinStore[], pSold[], manufPrice[], sellingPrice[]);

for (i=0; i < pSold.length; i++)
 totitems = totitems + pSold[i];
        System.out.println ("Total inventory: " + totitems);
		  
for (j=0; j < pinStore.length; j++)
 totinstore = totinstore + pinStore[j];
 		System.out.println ("Total number of items in the store: " + totinstore);
	
		} 
}
This article has been dead for over six months. Start a new discussion instead.