Question
Asked by:
mgroves22002
mgroves22002
Rating : No Rating
Questions Asked: 1
Tutorials Posted: 0
 

$50.00 Java Code

  • From Computer-Science: General-CS
  • Closed, but you can still post tutorials
  • Due on Jun. 14, 2008
  • Asked on Jun 06, 2008 at 9:52:28PM
Q:
Part 1:
• Create a Java application that displays the product number, the name of the product, the
number of units in stock, the price of each unit, and the value of the inventory (the
number of units in stock multiplied by the price of each unit). Pay attention to the good
programming practices in the text to ensure your source code is readable and well
documented.

Part 2:
• 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 the value of the entire inventory.
• Create another method to sort the array items by the name of the product.

Part 3:
• Modify the Inventory Program by creating a subclass of the product class that uses one
additional unique feature of the product you chose (for the DVDs subclass, you could use
movie title, for example). In the subclass, create a method to calculate the value of the
inventory of a product with the same name as the method previously created for the
product class. The subclass method should also add a 5% restocking fee to the value of
the inventory of that product.
• Modify the output to display this additional feature you have chosen and the restocking
fee.

Part 4:
• 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.

Part 5:
• Modify the Inventory Program by adding a button to the GUI that allows the user to move
to the first item, the previous item, the next item, and the last item in the inventory. If the
first item is displayed and the user clicks on the Previous button, the last item should
display. If the last item is displayed and the user clicks on the Next button, the first item
should display.
• Add a company logo to the GUI using Java graphics classes.

Part 6:
• 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.
 


   
   
   
   
 
Available Tutorials to this Question
Posted by:
techy
techy
Rating (205): B+
Questions Asked: 2
Tutorials Posted: 637, earned $13,324.98
 

$35.00 Inventory Program 1 to 6 all parts

  • This tutorial was purchased 4 times and hasn't been rated yet.
  • Posted on Jun. 07, 2008 at 12:20:09AM
A:
Preview: ... tached ...

The full tutorial is about 8 words long plus attachments.

Attachments:
Inventory Program Part 1 to 6.zip (44K)
Posted by:
b_h
b_h
Rating (671): A+
Questions Asked: 0
Tutorials Posted: 1188, earned $24,653.40
 

$40.00 CD Inventory Program Parts 1-6 with with Logo, Add, Delete, Modify, Search, Save, Load

  • This tutorial was purchased 5 times and hasn't been rated yet.
  • Posted on Jun. 07, 2008 at 08:00:30AM
A:
Preview: ... part. Code is commented to explain functionality and str ...

The full tutorial is about 48 words long plus attachments and additional clarification.

Attachments:
All_parts.zip (49K)
Posted by:
spccraig9
spccraig9
Rating : No Rating
Questions Asked: 8
Tutorials Posted: 1, earned $0.00
 

$50.00 Payroll Program

  • This tutorial hasn't been purchased yet.
  • Posted on Jun 07, 2008 at 5:24:31PM
A:
Preview: ... a<br> ButtonListener buttonListener = new ButtonListener();<br> previous.addActionListener(buttonListener);<br> next.addActionListener(buttonListener);<br> <br> JPanel up = new JPanel();<br> up.setLayout(new GridLayout(7,2));<br> up.add(itemNum); up.add(itemNumValue);<br> up.add(itemID); up.add(itemIDValue);<br> up.add(unit); up.add(unitValue);<br> up.add(name); up.add(nameValue);<br> up.add(price); up.add(priceValue);<br> up.add(restockingFee); up.add(rfValue);<br> up.add(invent); up.add(inventValue);<br> display();<br> JPanel middle = new JPanel();<br> middle.setLayout(new FlowLayout());<br> middle.add(previous); middle.add(next);<br> JPanel down = new JPanel();<br> down.setLayout(new BorderLayout());<br> down.add(BorderLayout.CENTER, totalValue);<br> <br> JPanel all = new JPanel();<br> all.setLayout(new BoxLayout(all, BoxLayout.Y_AXIS));<br> all.add(up);<br> all.add(down);<br> all.add(middle);<br> <br> Container cp = getContentPane();<br> cp.add(BorderLayout.NORTH, all);<br> }<br> <br> public static void main(String[] args) {<br> JApplet applet = new InventoryPart5();<br> JFrame frame = new JFrame("Inventory Part5");<br> frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);<br> frame.setResizable(false); <br> frame.getContentPane().add(applet);<br> frame.setSize(300,240);<br> applet.init();<br> frame.setVisible(true);<br> }<br>}<br><br><br>// InventoryPart5.java<br><br>import java.text.DecimalFormat;<br>import javax.swing.*;<br>import java.awt.*;<br>import javax.swing.event.*;<br>import java.awt.event.*;<br>import java.util.*;<br>import java.io.*;<br><br>public class InventoryPart5 extends JApplet {<br> private static final long serialVersionUID = 1L;<br> <br> private JLabel itemNum = new JLabel("Item Number");<br> private JTextField itemNumValue = new JTextField();<br> private JLabel itemID = new JLabel("Item ID");<br> private JTextField itemIDValue = new JTextField();<br> private JLabel name = new JLabel("Name");<br> private JTextField nameValue = new JTextField();<br> private JLabel unit = new JLabel("Unit");<br> private JTextField unitValue = new JTextField();<br> private JLabel price = new JLabel("Price");<br> private JTextField priceValue = new JTextField();<br> private JLabel restockingFee = new JLabel("Restocking Fee");<br> private JTextField rfValue = new JTextField();<br> private JLabel invent = new JLabel("Inventory Value");<br> private JTextField inventValue = new JTextField();<br> private JLabel totalValue = new JLabel();<br> private JButton previous = new JButton("Previous");<br> private JButton next = new JButton("Next");<br> private JButton save = new JButton("Save");<br> private JButton add = new JButton("Add");<br> private JButton modify = new JButton("Modify");<br> private JButton delete = new JButton("Delete");<br> <br> private ArrayList <AddItemID>products=new ArrayList<AddItemID>();<br> private int current = 0;<br> <br> class ButtonListener implements ActionListener {<br> public void actionPerformed(ActionEvent e) {<br> JButton button = (JButton) e.getSource();<br> int total = products.size();<br> if (button == previous) current = (current + total - 1) % total;<br> if (button == next) current = (current + 1) % total;<br> display();<br> }<br> }<br> <br> private void display() {<br> Add ...

The full tutorial is about 1909 words long plus attachments.

Attachments:
AddItemID.java (0K) (Preview)
InventoryPart1.java (0K) (Preview)
InventoryPart3.java (2K) (Preview)
InventoryPart2.java (1K) (Preview)
Posted by:
B_W
B_W
Rating (434): A+
Questions Asked: 1
Tutorials Posted: 1734, earned $15,897.62
 

$5.00 Inventory Program Part 1 - Graded 100%

  • This tutorial hasn't been purchased yet.
  • Posted on Sep 07, 2009 at 12:30:58PM
A:
Preview: ... of units in stock, and the price of each unit. Create a Java application that displays the product number, the name of the product, the number of units in sto ...

The full tutorial is about 143 words long plus attachments.

Attachments:
Inventory1.java (3K) (Preview)
Posted by:
B_W
B_W
Rating (434): A+
Questions Asked: 1
Tutorials Posted: 1734, earned $15,897.62
 

$5.00 Inventory Program Part 2 - Graded A+ 100%

  • This tutorial hasn't been purchased yet.
  • Posted on Sep 07, 2009 at 12:32:25PM
A:
Preview: ... y Program Part 2 Modify the Inventory Program so the application can handle multiple items. Use an array to store the items. T ...

The full tutorial is about 116 words long plus attachments.

Attachments:
Inventory2.java (3K) (Preview)
Posted by:
B_W
B_W
Rating (434): A+
Questions Asked: 1
Tutorials Posted: 1734, earned $15,897.62
 

$5.00 Inventory Program Part 3 - Received 100% and you will too!!

  • This tutorial hasn't been purchased yet.
  • Posted on Sep 07, 2009 at 12:34:13PM
A:
Preview: ... ously created for the product class. The subclass method should also add a 5% restocking fee to the value of the inventory of that pro ...

The full tutorial is about 118 words long plus attachments.

Attachments:
Inventory3.java (4K) (Preview)
Posted by:
B_W
B_W
Rating (434): A+
Questions Asked: 1
Tutorials Posted: 1734, earned $15,897.62
 

$5.00 Inventory Program Part 4 - Office Supplies - Graded 100%

  • This tutorial hasn't been purchased yet.
  • Posted on Sep 07, 2009 at 12:36:48PM
A:
Preview: ... the product, the number of units in stock, the price of each unit, and the value of the inventory of that pr ...

The full tutorial is about 99 words long plus attachments.

Attachments:
ProductInventory4GUI.java (10K) (Preview)
Posted by:
B_W
B_W
Rating (434): A+
Questions Asked: 1
Tutorials Posted: 1734, earned $15,897.62
 

$5.00 Inventory Program Part 5 - Office Supplies - Graded A+ 100%

  • This tutorial hasn't been purchased yet.
  • Posted on Sep 07, 2009 at 12:38:51PM
A:
Preview: ... item should display. If the last item is displayed and the user clicks on the Next button, the first item should display. Add a company logo to th ...

The full tutorial is about 133 words long plus attachments.

Attachments:
ProductInventory5GUI.java (12K) (Preview)
Logo.jpg (12K) (Preview)
Posted by:
B_W
B_W
Rating (434): A+
Questions Asked: 1
Tutorials Posted: 1734, earned $15,897.62
 

$5.00 Final Project: Inventory Program Part 6 - Office Supplies - Graded 100% A+ 200/200

  • This tutorial hasn't been purchased yet.
  • Posted on Sep 07, 2009 at 12:43:16PM
A:
Preview: ... 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 ...

The full tutorial is about 171 words long plus attachments.

Attachments:
ProductInventory6GUI.java (22K) (Preview)
Logo.jpg (12K) (Preview)
   
Join Now or Log In
Get Tutoring
Get Paid
Academic Honesty