Modify the Inventory Program to include an Add button, a Delete button, and a Modify button on the GUI. These buttons should allow the user to perform the corresponding actions on the item name, the number of units in stock, and the price of each unit. An item added to the inventory should have an item number one more than the previous last item.
Add a Save button to the GUI that saves the inventory to a C:\data\inventory.dat file.
Use exception handling to create the directory and file if necessary.
Add a search button to the GUI that allows the user to search for an item in the inventory by the product name. If the product is not found, the GUI should display an appropriate message. If the product is found, the GUI should display that product’s information in the GUI.
import javax.swing.JOptionPane;
class cd{
public static void main(String[]args) {
}
public cd(int i, String string) {
// TODO Auto-generated constructor stub
}
public cd(Object println) {
// TODO Auto-generated constructor stub
}
public static void main(String args) {
cd cd = new cd (4, args);
cd = new cd (1, "Sevens");
System.out.println(cd);
cd = new cd(2, "Beyond the Season");
System.out.println(cd);
cd = new cd(3, "Fresh Horses");
System.out.println(cd);
cd = new cd(4, "Scarecrow");
System.out.println("Title of cd is " + cd.cdtitle());
System.out.println("Units in stock is " + cd.cdunits());
System.out.println("How much the price of cd is " + cd.cdprice());
System.out.println("Value of inventory is " + cd.cdinventory());
}private String cdinventory() {
// TODO Auto-generated method stub
return null;
}
String cdprice() {
// TODO Auto-generated method stub
return null;
}
//end main
String cdunits() {
// TODO Auto-generated method stub
return null;
}
String cdtitle() {
// TODO Auto-generated method stub
return null;
}// end class cd
}
public class CdInventory
{
public static void main( String args [ ])
{
cd[] cdcollection = new cd [10]
// Please enter cdTitle
String cdTitle = JOptionPane.showInputDialog("Please enter CD Title or quit the program:");
System.out.println("Cd inventory");
Object product;
System.out.printf( "%s %s\n", "Cd Title:",
((Object) product).cdtitle() );
System.out.printf( "%s %d\n", "Units Available:",
((Object) product).cdunits() );
System.out.printf( "%s $%g\n", "Price Per Unit:",
((Object) product).cdprice() );
} // end main method
} // end class CarsInventory
I am looking for help with this. I have been fighting this course for the past nine weeks and do not understand. I have went to my instructor which did me no good. I have looked at YouTube videos, read the required materials, and using Eclipse. I do not know what to do now that my Final is due is four hours and do not understand how to do it.