Hello all,

I am working on a project and I could use some script help. I have been recently learning about exceptions and inheritance. I need to add more to this program and I could use some script help...thanks in advance!


1) I must get the menu items (1-9) to work for GadgetInventory. So far, I already done menu items#5 and 9. I am trying to work on the others.
2) I must implement Serializable for the blueprint classes.
3) I must generate JavaDocs via *.html file. I know how to do this already.
** I am trying to get this program to work with my previous program called Gadget!

For the record, I am using Java 6.0 with Eclipse software 3.2.2

This is what I have so far.....

--------------------------------------------------------------------------

import java.util.*;

public class GadgetInventory {


public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
ArrayList<Gadget> Gadget = new ArrayList<Gadget>();

MenuInfo mi = new MenuInfo();

Gadget.add(new Gadget(300, 45.00, 200, "blue, round"));
Gadget.add(new Gadget(200, 30.00, 250, "red, long"));
Gadget.add(new Gadget(250, 54.00, 320, "pink, square"));
Gadget.add(new Gadget(5000, 23.00, 5500, "black, large"));
Gadget.add(new Gadget(430, 10.00, 480," brown, small"));
Gadget.add(new Gadget(10, 77.00, 20, "green, smelly"));
Gadget.add(new Gadget(450, 21.00, 500, "red, fruity"));
Gadget.add(new Gadget(65, 20.00, 34, "purple,heavy"));
Gadget.add(new Gadget(87, 4.00, 95,"yellow, oblong"));
Gadget.add(new Gadget(35, 32.00, 50,"white, flat"));



int ans=0;
while (true)
{
menu();
System.out.println("CHOICE:");
ans = scan.nextInt();
if (ans==1)
{
// read serializable
Gadget=mi.readSerializable();

}

if (ans==2)
{
// write serializable
mi.writeSerializable(Gadget);

}
if (ans==3)
{
// total value of all inventory
mi.total(Gadget);

}

if (ans == 4)
{
// list all Gadgets below reorder level
mi.reorder(Gadget);
}

if (ans == 5)
{
// print all Gadgets
mi.print(Gadget);
}

if (ans==6)
{
// find a Gadget by id number
mi.find(Gadget);
}
if (ans==7)
{
// add a Gadget
mi.addGadget(Gadget);
}
if (ans==8)
{
// delete a Gadget (ask them for the number first)
mi.deleteGadget(Gadget);
}


if (ans==9)
{
System.out.println("See you later!");
System.exit(0);
}

}
}

public static void menu()
{
System.out.println("\n1. read a serializable file");
System.out.println("2. write to a serialized file");
System.out.println("3. find the total value of all inventory");
System.out.println("4. list all Gadgets below reorder level");
System.out.println("5. print all Gadget information");
System.out.println("6. find a Gadget by Gadget id number");
System.out.println("7. add a new Gadget");
System.out.println("8. totally delete a Gadget");
System.out.println("9. exit\n");
}

}