Something small is missing in my code and can’t figure it out
Something small is missing in my code and can’t figure it out
I have another really simple question that I need help with. So my instructor took off points and commented “No sort functionality from part 3” in the part 4 assignment that I submitted. I can’t figure out why he said that. Need to include sort functionality in the assignment definitely though in Part 4 as it was done in part 3. Can you guys please check and let me know how and where the sort functionality is missing in part 4 and correct it?
Inventory program part 2 & 3/.DS_Store
__MACOSX/Inventory program part 2 & 3/._.DS_Store
Inventory program part 2 & 3/ProductTools.java /* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package tools.inventory.program;
//Product class
public class ProductTools
{
// Variable to store store the product name, ID, units in stock, and price of each unit
private String productName;
private int productID;
private long unitsInStock;
private float unitPrice;
ProductTools()
{
setName(“UNKNOWN”);
setProductID(0);
setUnitPrice(0);
setUnitsInStock(0);
}
// Constructor for a product with a name, ID, unit price, and no. of units in stock
ProductTools(String productName, int productID, float unitPrice, long unitsInStock)
{
setName(productName);
setProductID(productID);
setUnitPrice(unitPrice);
setUnitsInStock(unitsInStock);
}
public void setName (String productName)
{
this.productName = productName;
}
public void setProductID (int productID)
{
this.productID = productID;
}
public void setUnitPrice (float unitPrice)
{
this.unitPrice = unitPrice;
}
public void setUnitsInStock (long unitsInStock)
{
this.unitsInStock = unitsInStock;
}
public String getName()
{
return productName;
}
public int getProductID()
{
return productID;
}
public long getUnitsInStock()
{
return unitsInStock;
}
public float getUnitPrice()
{
return unitPrice;
}
public float getTotalValue()
{
return (unitsInStock * unitPrice);
}
}
__MACOSX/Inventory program part 2 & 3/._ProductTools.java Mac OS X 2 ¢ Ô ATTR Ô ˜
Is this the question you were looking for? If so, place your order here to get started!