Recent Feedback
Choose a product that lends itself to an inventory (for example, products at your workplace, office supplies, music CDs, DVD movies, or software). · Create a product class that holds the item number, the name of the product, the number 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 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. · Post as an attachment. Please submit only the .java files. The data for this CheckPoint should be provided by you in your program. The data should not be requested from the user.
Optional Information: OS: Windows Vista; Browser: Firefox
HiCustomer Thank you for choosing me to help you with this assignment.I need more information about your question.Could you kindly clarify this question?Do you need a GUI? If so, which functionalities should I put on it?Please reply as soon as possible so that I can finish answering your question.
HiCustomerI've just realized that your assignment is the first part of the Inventory Program.I did the part 3 for another customer before.
Hello again thank you for your time I did not respond yesterday because of problems with my phone. Do I place the product part first or the inventory part?
Hi, you saw what I did until now, I mean, the source files that I uploaded for you?
Hello what I mean is do I string the inventory part1 and the product part of the program in this manner? public class Product { private int itemNumber; private String name; private int unitsInStock; private double unitPrice; public Product(int itemNumber, String name, int unitsInStock, double unitPrice) { this.itemNumber = itemNumber; this.name = name; this.unitsInStock = unitsInStock; this.unitPrice = unitPrice; } public int getItemNumber() { return itemNumber; } public String getName() { return name; } public double getUnitPrice() { return unitPrice; } public int getUnitsInStock() { return unitsInStock; } public double getValueOfProduct() { return unitsInStock * unitPrice; } public void setItemNumber(int itemNumber) { this.itemNumber = itemNumber; } public void setName(String name) { this.name = name; } public void setUnitPrice(double unitPrice) { this.unitPrice = unitPrice; } public void setUnitsInStock(int unitsInStock) { this.unitsInStock = unitsInStock; } public String toString() { String itemStr = "Item Number: " + String.format("%-4s | ", itemNumber); String titleStr = "Name: " + String.format("%-20s | ", name); String unitsStr = "Units In Stock: " + String.format("%4d | ", unitsInStock); String costStr = "Unit Price: " + String.format("$ %6.2f | ", unitPrice); String valueStr = "Value: " + String.format("$ %8.2f", getValueOfProduct()); return itemStr + titleStr + unitsStr + costStr + valueStr; } } public class InventoryProgramPart1 { public static void main(String args[]) { Product one = new Product(1, "CD one", 125, 9.00); Product two = new Product(2, "CD two", 700, 12.50); Product three = new Product(3, "CD three", 1200, 5.80); Product four = new Product(4, "CD four", 275, 40.99); Product five = new Product(5, "CD five", 500, 9.00); Product six = new Product(6, "CD six", 722, 12.50); Product seven = new Product(7, "CD seven", 312, 5.80); Product eight = new Product(8, "CD eight", 47, 40.30); System.out.println(one); System.out.println(two); System.out.println(three); System.out.println(four); System.out.println(five); System.out.println(six); System.out.println(seven); System.out.println(eight); } }
Hi, I guess you want to put all code in one file, right? If so, here is it: InventoryProgramPart1.javaLet me know if you need further help.
Hello again thank you for your time and effort I have loaded the program into NetBeans and saved it however it will not execute.
Hi,Could you kindly paste the errors here?
InventoryProgramPart1 - NetBeans
Experience: Desktop, Mobile and Web Developer. 7+ years of experience. Creative solutions provider.
Hello I will figure out what is going on there are no errors the run prompt does not display when I open the program. I will pay you and if I have any question or i can not figure it out i will contact you. Thank you.
Ok I'll be ready to help you.