473,791 Members | 3,071 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Inventory program in Java

7 New Member
I am trying to add the Delete button, save and search buttons. I have tried to call my teacher and he is absolutly no help and i have read and reread the text but still have no idea what is going on.........I have the added the add button but now i am stuck. Is there a simple way in completeing this??

Please help

• Due Date: Day 7 [Individual] forum
• 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\invento ry.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. • Post as an attachment
Jan 26 '07
67 23047
stevedub
40 New Member
Ok, I got it to compile, I just needed to add a couple more imports at the top of the inventory program.
Feb 5 '07 #11
r035198x
13,262 MVP
Ok, I got it to compile, I just needed to add a couple more imports at the top of the inventory program.


I hope you understand all of it.
Feb 5 '07 #12
stevedub
40 New Member
Ok, after running the program I noticed that this is a step ahead of what I need. What I need to do is have that code display just a list. here is a link to what it is suppose to look like, we can pick whichever way to display, the top or bottom version . http://i88.photobucket.com/albums/k1...oryexample.jpg

If you can help at all with this I will forever be in debt.
Feb 5 '07 #13
stevedub
40 New Member
Here is my code from last week's assignment. We are to modify this to look like the link above:

Expand|Select|Wrap|Line Numbers
  1. class Product implements Comparable
  2. {
  3.    private String title;   // class variable that stores the item name
  4.    private int item;     // class variable that stores the item number
  5.    private double stockQuantity;   // class variable that stores the quantity in stock
  6.    private double price;     // class variable that stores the item price
  7.  
  8.    public Product()
  9.    {
  10.       title = "";
  11.       item = 0;
  12.       stockQuantity = 0;
  13.       price = 0.0;
  14.    }
  15.  
  16.    public Product(String title, int item, double stockQuantity, double price)
  17.    {
  18.       this.title = title;
  19.       this.item = item;
  20.       this.stockQuantity = stockQuantity;
  21.       this.price = price;
  22.    }
  23.  
  24.    public void setTitle(String title)
  25.    {
  26.       this.title = title;
  27.    }
  28.  
  29.    public String getTitle()
  30.    {
  31.       return title;
  32.    }
  33.  
  34.    public void setItem(int item)
  35.    {
  36.       this.item = item;
  37.    }
  38.  
  39.    public int getItem()
  40.    {
  41.       return item;
  42.    }
  43.  
  44.    public void setStockQuantity(double quantity)
  45.    {
  46.       stockQuantity = quantity;
  47.    }
  48.  
  49.    public double getStockQuantity()
  50.    {
  51.       return stockQuantity;
  52.    }
  53.  
  54.    public void setItemPrice(double price)
  55.    {
  56.       this.price = price;
  57.    }
  58.  
  59.    public double getItemPrice()
  60.    {
  61.       return price;
  62.    }
  63.  
  64.    public double calculateInventoryValue()
  65.    {
  66.       return (price * stockQuantity)*.05+(price*stockQuantity);
  67.    }
  68.  
  69.    public int compareTo(Object o)
  70.    {
  71.       Product p = null;
  72.       try
  73.       {
  74.          p = (Product) o;
  75.       }
  76.       catch (ClassCastException cE)
  77.       {
  78.          cE.printStackTrace();
  79.       }
  80.       return title.compareTo(p.getTitle());
  81.    }
  82.  
  83.    public String toString()
  84.    {
  85.       return "DVD Title: " + title + "\nItem #: " + item + "\nPrice: $" + price + "\nQuantity: "
  86.       + stockQuantity + "\nValue: $" + calculateInventoryValue();
  87.    }
  88. }
  89.  
  90.  
  91. class DVD extends Product
  92. {
  93.  
  94.    String genre;
  95.    double restockingFee;
  96.  
  97.  
  98.    public DVD(String title, int item, double stockQuantity,double price ,double restockingFee, String genre)
  99.    {
  100.       super(title,item,  stockQuantity, price);
  101.       this.genre = genre;
  102.       this.restockingFee = 0.05;
  103.  
  104.       // TODO Auto-generated constructor stub
  105.    }
  106.  
  107.    //returns the value of the inventory, plus the restocking fee
  108.    public double getInventoryValue()
  109.    {
  110.       // TODO Auto-generated method stub
  111.       return super.getItemPrice() + restockingFee;
  112.    }
  113.  
  114.    public String toString()
  115.    {
  116.       //this is not efficient
  117.       //StringBuffer sb = new StringBuffer("Genre      \t").append(genre).append("\n");
  118.       //sb.append(super.toString());
  119.  
  120.       return super.toString() + "\nGenre      \t" + genre + "\nRestockingFee  \t" +restockingFee;
  121.    }
  122.  
  123. }
  124.  
  125.  
  126.  
  127.  
  128. public class Inventory2
  129. {
  130.    Product[] supplies;
  131.  
  132.    public static void main(String[] args)
  133.    {
  134.       Inventory2 inventory = new Inventory2();
  135.       inventory.addProduct(new DVD("Beerfest", 1, 15, 22.95,.05,"Action"));
  136.       inventory.addProduct(new DVD("Illustionist", 2, 25, 25.95,.05,"Comedy"));
  137.       inventory.addProduct(new DVD("Employee of the Month", 3, 10,23.95,.05,"Comedy"));
  138.  
  139.       System.out.println("Inventory of DVD Movies:\n\n");
  140.  
  141.  
  142.       System.out.println();
  143.       inventory.showInventory();
  144.       inventory.sortByName();
  145.       System.out.println();
  146.       inventory.showInventory();
  147.  
  148.       double total = inventory.calculateTotalInventory();
  149.       System.out.println("Total Value is: $" + total);
  150.  
  151.  
  152.    }
  153.  
  154.    public void sortByName()
  155.    {
  156.       for (int i = 1; i < supplies.length; i++)
  157.       {
  158.          int j;
  159.          Product val = supplies[i];
  160.          for (j = i - 1; j > -1; j--)
  161.          {
  162.             Product temp = supplies[j];
  163.             if (temp.compareTo(val) <= 0)
  164.             {
  165.                break;
  166.             }
  167.             supplies[j + 1] = temp;
  168.          }
  169.          supplies[j + 1] = val;
  170.       }
  171.    }
  172.  
  173.    //creates a String representation of the array of products
  174.    public String toString()
  175.    {
  176.       String s = "";
  177.       for (Product p : supplies)
  178.       {
  179.          s = s + p.toString();
  180.          s = s + "\n\n";
  181.       }
  182.       return s;
  183.    }
  184.  
  185.    //Using an array so adding an item requires us to increase the size of the array first
  186.    public void addProduct(Product p1)
  187.    {
  188.       if (supplies == null)
  189.       {
  190.          supplies = new Product[0];
  191.       }
  192.       Product[] p = supplies; //Copy all products into p first
  193.       Product[] temp = new Product[p.length + 1]; //create bigger array
  194.       for (int i = 0; i < p.length; i++)
  195.       {
  196.          temp[i] = p[i];
  197.       }
  198.       temp[(temp.length - 1)] = p1; //add the new product at the last position
  199.       supplies = temp;
  200.    }
  201.  
  202.    //sorting the array using Bubble Sort
  203.    public double calculateTotalInventory()
  204.    {
  205.       double total = 0.0;
  206.       for (int i = 0; i < supplies.length; i++)
  207.       {
  208.          total = total + supplies[i].calculateInventoryValue();
  209.       }
  210.       return total;
  211.    }
  212.  
  213.    public void showInventory()
  214.    {
  215.       System.out.println(toString()); //call our toString method
  216.    }
  217. }
  218.  
Feb 5 '07 #14
stevedub
40 New Member
Also, with the OP's code, how do you get your image to show? I tried to make a logo, but I don't see anything. What I did was I made an image and named it "dvd.gif" and put it in the same folder as the code. Is this the correct way to do that?
Feb 6 '07 #15
r035198x
13,262 MVP
Also, with the OP's code, how do you get your image to show? I tried to make a logo, but I don't see anything. What I did was I made an image and named it "dvd.gif" and put it in the same folder as the code. Is this the correct way to do that?
Alright Steve let's do this one step at a time. Were you able to display the products on a panel on the JFrame?
Feb 6 '07 #16
stevedub
40 New Member
Ok, I was able to get the OP's code to load properly. I have the same assignment due this Sunday. I think I may be to late to turn in the assignment from last week, the one that I gave the link to. So I guess I will try to work on the assignment for this week. Here is the link for this assingment.
https://ecampus.wintu.e du/afm101/secure/view-attachment.jspa ? ID=2016792&mess ageID=10060298& name=Week%208%2 0checkpoint%202 %20example.doc
Feb 6 '07 #17
r035198x
13,262 MVP
Ok, I was able to get the OP's code to load properly. I have the same assignment due this Sunday. I think I may be to late to turn in the assignment from last week, the one that I gave the link to. So I guess I will try to work on the assignment for this week. Here is the link for this assingment.
https://ecampus.wintu.e du/afm101/secure/view-attachment.jspa ? ID=2016792&mess ageID=10060298& name=Week%208%2 0checkpoint%202 %20example.doc
That link requires me to log in with details which I don't have. Just post the code for the stage you are at and tell us what the next step is.
Feb 6 '07 #18
stevedub
40 New Member
Here is the code:

Expand|Select|Wrap|Line Numbers
  1. import java.util.*;
  2. import javax.swing.*;
  3. import java.awt.event.*;
  4. import java.awt.*;
  5.  
  6. class Product implements Comparable {
  7.  String itemName;     // class variable that stores the item name
  8.  double itemNumber;     // class variable that stores the item number
  9.  long stockQuantity; // class variable that stores the quantity in stock
  10.  double price;     // class variable that stores the item price
  11.  
  12.  public Product() {
  13.        itemName = "";
  14.      itemNumber = 0.0;
  15.      stockQuantity = 0L;
  16.      price = 0.0;
  17.  
  18.  }
  19.  public Product(String name, int number, long stockQuantity, double price) {
  20.      this.itemName = name;
  21.      this.itemNumber = number;
  22.      this.stockQuantity = stockQuantity;
  23.      this.price = price;
  24.     }
  25.  public void setItemName(String name) {
  26.   this.itemName = itemName;
  27.  }
  28.  public String getItemName() {
  29.   return itemName;
  30.  }
  31.  public void setItemNumber(double number) {
  32.   this.itemNumber = itemNumber;
  33.  }
  34.  public double getItemNumber() {
  35.   return itemNumber;
  36.  }
  37.  public void setStockQuantity(long quantity) {
  38.   stockQuantity = quantity;
  39.  }
  40.  public long getStockQuantity() {
  41.   return stockQuantity;
  42.  }
  43.  public void setItemPrice(double price) {
  44.   this.price = price;
  45.  }
  46.  public double getItemPrice() {
  47.   return price;
  48.  }
  49.  public double calculateInventoryValue() {
  50.   return getItemPrice() * getStockQuantity();
  51.  }
  52.  public int compareTo (Object o) {
  53.   Product p = (Product)o;
  54.   return itemName.compareTo(p.getItemName());
  55.  }
  56.  public String toString() {
  57.   return "Title :"+getItemName() + "\nStock Number"+itemNumber+"\nPrice"+price+"\nQuantity"+stockQuantity + "\nValue :"+calculateInventoryValue();
  58.  }
  59.  
  60. }
  61.  
  62. class DVD extends Product implements Comparable {
  63. private String rating;
  64. public DVD() {
  65. super(); //Call the constructor in Product
  66. rating = ""; //Add the additonal attribute
  67. }
  68. public DVD(String itemName, int itemNumber, long stockQuantity, double price, String rating) {
  69. super(itemName, itemNumber, stockQuantity, price); //Call the constructor in Product
  70. this.rating = rating; //Add the additonal attribute
  71.     }
  72. public void setRating(String rating) {
  73. this.rating = rating;
  74. }
  75. public String getRating() {
  76. return rating;
  77. }
  78. public double calculateInventoryValue() {
  79. return getItemPrice() * getStockQuantity() + getItemPrice()*getStockQuantity()*0.05; //Had you forgotten to include the restocking fee?
  80. }
  81. //What happens when we want to change the restocking fee?
  82. public double calculateRestockFee() {
  83. return getItemPrice() * 0.05;
  84. }
  85. public int compareTo (Object o) {
  86. Product p = (Product)o;
  87. return getItemName().compareTo(p.getItemName());
  88. }
  89. public String toString() {
  90. return "Name :"+getItemName() + "\nNumber"+getItemNumber()+"\nPrice"+getItemPrice()+"\nQuantity"+getStockQuantity() +"\nRating :"+getRating()+"\nValue"+calculateInventoryValue();
  91. }
  92. }
  93.  
  94.  
Feb 6 '07 #19
stevedub
40 New Member
Expand|Select|Wrap|Line Numbers
  1. import java.util.*;
  2. import javax.swing.*;
  3. import java.awt.event.*;
  4. import java.awt.*;
  5.  
  6. public class Inventory1 extends JFrame implements ActionListener {
  7. //Utility class for displaying the picture
  8. //If we are going to use a class/method/variable inside that class only, we declare it private in that class
  9. private class MyPanel extends JPanel {
  10.     ImageIcon image = new ImageIcon("dvd.gif");
  11.     int width = image.getIconWidth();
  12.     int height = image.getIconHeight();
  13.     long angle = 30;
  14.     public MyPanel(){
  15.      super();
  16.     }
  17.     public void paintComponent(Graphics g){
  18.      super.paintComponent(g);
  19.      Graphics2D g2d = (Graphics2D)g;
  20.      //g2d.rotate (Math.toRadians(angle), 60+width/2, 60+height/2);
  21.      g2d.drawImage(image.getImage(), 60, 60, this);
  22.      g2d.dispose();
  23.     }
  24. }//end class MyPanel
  25.  
  26. int currentIndex; //Currently displayed Item
  27. Product[] supplies = new Product[4];
  28. JLabel itemName ;
  29. JLabel itemNumber;
  30. JLabel rating;
  31. JLabel quantity;
  32. JLabel price;
  33. JLabel fee;
  34. JLabel totalValue;
  35. JTextField itemNameField = new JTextField(20);
  36. JTextField itemNumberField = new JTextField(20);
  37. JTextField ratingField = new JTextField(20);
  38. JTextField quantityField = new JTextField(20);
  39. JTextField priceField = new JTextField(20);
  40.  
  41. JPanel display;
  42. JPanel displayHolder;
  43. JPanel panel;
  44. public Inventory1() {
  45. makeTheDataItems();
  46. setSize(600, 500);
  47. setTitle("DVD Inventory Program");
  48. //make the panels
  49. display = new JPanel();
  50. JPanel other = new JPanel();
  51. JPanel picture = new MyPanel();
  52. JPanel buttons = new JPanel();
  53. JPanel centerPanel = new JPanel();
  54. displayHolder = new JPanel();
  55. display.setLayout(new GridLayout(5, 3));
  56. other.setLayout(new GridLayout(2, 1));
  57. //make the labels
  58. itemName = new     JLabel("Name       :");
  59. itemNumber = new     JLabel("Number       :");
  60. rating = new     JLabel("Rating      :");
  61. quantity = new JLabel("Quantity       :");
  62. price = new     JLabel("Price       :");
  63. fee = new        JLabel("Fee       :");
  64. totalValue = new JLabel("Total Value       :");
  65. //Use the utility method to make the buttons
  66. JButton first = makeButton("First");
  67. JButton next = makeButton("Next");
  68. JButton previous = makeButton("Previous");
  69. JButton last = makeButton("Last");
  70. JButton exit = makeButton("Exit");
  71. //Other buttons
  72. JButton add = makeButton("Add");
  73.  
  74. //Add the labels to the display panel
  75. display.add(itemName);
  76. display.add(itemNumber);
  77. display.add(rating);
  78. display.add(quantity);
  79. display.add(price);
  80. display.add(fee);
  81. //add the buttons to the buttonPanel
  82. buttons.add(first);
  83. buttons.add(previous);
  84. buttons.add(next);
  85. buttons.add(last);
  86. buttons.add(exit);
  87. //Add the picture panel and display to the centerPanel
  88. displayHolder.add(display);
  89. centerPanel.setLayout(new GridLayout(2, 1));
  90. centerPanel.add(picture);
  91. centerPanel.add(displayHolder);
  92. other.add(buttons);
  93. JPanel forAdd = new JPanel(); // add the other buttons to this panel
  94. forAdd.add(add);
  95. other.add(forAdd);
  96.  
  97. //Add the panels to the frame
  98. getContentPane().add(centerPanel, "Center");
  99. getContentPane().add(other, "South");
  100. this.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
  101. setVisible(true);
  102. }
  103. private void makeTheDataItems () {
  104.   Product p1 = new DVDTitle("Beerfest", 001, 200, 12.99, "R");
  105.   Product p2 = new DVDTitle("The Illusionist", 002, 50, 9.95, "PG-13");
  106.   Product p3 = new DVDTitle("Employee of the Month  ", 003, 100, 19.95, "R");
  107.   Product p4 = new DVDTitle("Pirates of the Caribbean 2  ", 004, 75, 9.99, "PG-13");
  108.  
  109.   supplies[0] = p1;
  110.   supplies[1] = p2;
  111.   supplies[2] = p3;
  112.   supplies[3] = p4;
  113. }
  114. //Utility method for creating and dressing buttons
  115. private JButton makeButton(String label) {
  116. JButton button = new JButton(label);
  117. button.setActionCommand(label);
  118. button.addActionListener(this);
  119. return button;
  120. }
  121. private void addItem() {
  122. System.out.println("eeeeeeeeee");
  123. panel = new JPanel();
  124. JPanel add = new JPanel();
  125. add.setLayout(new GridLayout(2, 1));
  126. add.setLayout(new GridLayout(4, 4));
  127. JButton addIt = makeButton("Add Item");
  128. JLabel itemName = new JLabel("Name       :");
  129. //JLabel itemNumber = new JLabel("Number       :");
  130. JLabel rating = new JLabel("Rating       :");
  131. JLabel quantity = new JLabel("Quantity    :");
  132. JLabel price = new JLabel("Price     :");
  133. add.add(itemName); add.add(itemNameField);
  134. //add.add(itemNumber); add.add(itemNumberField);
  135. add.add(rating); add.add(ratingField);
  136. add.add(quantity); add.add(quantityField);
  137. add.add(price); add.add(priceField);
  138. panel.add(add);
  139. JPanel forAddIt = new JPanel();
  140. forAddIt.add(addIt);
  141. panel.add(forAddIt);
  142. displayHolder.remove(display);
  143. displayHolder.add(panel);
  144. //display = panel;
  145. this.setVisible(true);
  146. }
  147.  
  148. public static void main( String args[]) {
  149. Inventory1 object = new Inventory1(); //The main method should not have too much code
  150. } // end main method
  151. public void actionPerformed(ActionEvent event) {
  152. String command = event.getActionCommand(); //This retrieves the command that we set for the button
  153. //Always compare strings using the .equals method and not using ==
  154. if(command.equals("First")) {
  155. displayFirst();
  156. }
  157. else if(command.equals("Next")) {
  158. displayNext();
  159. }
  160. else if(command.equals("Previous")) {
  161. displayPrevious();
  162. }
  163. else if(command.equals("Last")) {
  164. displayLast();
  165. }
  166. else if(command.equals("Exit")) {
  167. this.dispose();
  168. System.exit(0);
  169. }
  170. else if(command.equals("Add")) {
  171. addItem();
  172. }
  173. else if(command.equals("Add Item")) {
  174. addItemToArray();
  175. }
  176.  
  177. }
  178. private void addItemToArray() {
  179. Product p = new DVDTitle(itemNameField.getText(), supplies.length -2, Long.parseLong(quantityField.getText()),
  180. Double.parseDouble(priceField.getText()), ratingField.getText());
  181. //Extend size of array by one first
  182. Product[] ps = new Product[supplies.length + 1];
  183. for(int i = 0; i < ps.length-1; i++) {
  184. ps[i] = supplies[i];
  185. }
  186. ps[supplies.length] = p;
  187. supplies = ps;
  188. displayHolder.remove(panel);
  189. displayHolder.add(display);
  190. displayLast();
  191. this.setVisible(false);
  192. this.setVisible(true);
  193. }
  194. //Utility method to ease the typing and reuse code
  195. //This method reduces the number of lines of our code
  196. private void displayItemAt(int index) {
  197. DVDTitle product = (DVDTitle)supplies[index];
  198. itemName.setText("Item Name: "+ product.getItemName());
  199. itemNumber.setText("Item Number: "+ product.getItemNumber());
  200. rating.setText("Rating: "+ product.getRating());
  201. quantity.setText("Quantity In Stock: "+ product.getStockQuantity());
  202. price.setText("Item Price: "+ product.getItemPrice());
  203. totalValue.setText("Total: " + product.calculateInventoryValue());
  204. fee.setText("Fee :"+product.calculateRestockFee());
  205. this.setVisible(true);
  206. }
  207. public void displayFirst() {
  208. displayItemAt(0);
  209. currentIndex = 0;
  210. }
  211. public void displayNext() {
  212. if(currentIndex == supplies.length-1) {
  213. displayFirst();
  214. currentIndex = 0;
  215. }
  216. else {
  217. displayItemAt(currentIndex + 1);
  218. currentIndex++;
  219. }
  220. }
  221. public void displayPrevious() {
  222. if(currentIndex == 0) {
  223. displayLast();
  224. currentIndex = supplies.length-1;
  225. }
  226. else {
  227. displayItemAt(currentIndex - 1);
  228. currentIndex--;
  229. }
  230. }
  231. public void displayLast() {
  232. displayItemAt(supplies.length-1);
  233. currentIndex = supplies.length-1;
  234. }
  235. }//end class Inventory2.1
  236.  
  237.  
I need to display a company logo, this is where I am having trouble
Feb 6 '07 #20

Sign in to post your reply or Sign up for a free account.

Similar topics

109
25898
by: zaidalin79 | last post by:
I have a java class that goes for another week or so, and I am going to fail if I can't figure out this simple program. I can't get anything to compile to at least get a few points... Here are the assignments... 4. CheckPoint: Inventory Program Part 1 • Resource: Java: How to Program • Due Date: Day 5 forum • Choose a product that lends itself to an inventory (for example, products at your workplace, office supplies, music CDs, DVD...
0
7117
by: south622 | last post by:
I'm taking a beginning Java course and I'm stuck in week eight of a nine week course. If anyone could help me I would greatly appreciate it. This assignment was due yesterday and each day I go past the due date 10% of the grade is taken off. I think I'm coming down with the flu and my brain is just not processing this assignment. Here is the assignment: Modify the Inventory program by adding a button to the GUI that allows the user to move...
4
2313
nexcompac
by: nexcompac | last post by:
Ok, I posted a similar post but now need to jump back into it. Here is what I have been able to clean up. I am using textpad and jbuilder. Still getting used to the whole java world and I am trying to compile a program using TextPad. Here is what I have so far. /* * Main.java * * Created on July 19, 2007, 5:54 PM *
9
7612
by: xxplod | last post by:
I am suppose to modify the Inventory Program so the application can handle multiple items. Use an array to store the items. The output should display the information one product at a time, including the item number, the name of the product, the number of units in stock, the price of each unit, and the value of the inventory of that product. In addition, the output should display the value of the entire inventory. • Create a method to calculate...
3
7010
by: cblank | last post by:
I need some help if someone could help me. I know everyone is asking for help in java. But for some reason I'm the same as everyone else when it comes to programming in java. I have an inventory program that I have built so far with no problem. But I cannot figure out how to turn it into a GUI application. This is what I'm trying to get it to do. Modify the Inventory Program to use a GUI. The GUI should display the information one product...
5
3378
by: cblank | last post by:
I'm having some trouble with my inventory program. Its due tom and my teacher is not wanting to help. He keeps giving me a soluction that is not related to my code. I have everything working except the Delete and Modify Button. The Search button works but it only searchs the new .dat file or what is set in the array. Not sure what is going on there. But if I can get my delete and modify button to work that will be good. Code.... ...
2
2543
by: pinkf24 | last post by:
I cannot figure out how to add the following: 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...
3
4488
by: 100grand | last post by:
Modify the Inventory Program to use a GUI. The GUI should display the information one product at a time, including the item number, the name of the product, the number of units in stock, the price of each unit, and the value of the inventory of that product. In addition, the GUI should display the value of the entire inventory, the additional attribute, and the restocking fee. Here is my Inventory program from 1 to 3: package...
16
6006
by: lilsugaman | last post by:
I have to assignment which includes the following: Modify the Inventory Program so the application can handle multiple items. Use an array to store the items. The output should display the information one product at a time, including the item number, the name of the product, the number of units in stock, the price of each unit, and the value of the inventory of that product. In addition, the output should display the value of the entire...
0
9669
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10207
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10155
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9995
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7537
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5431
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4110
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3718
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2916
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.