Hello, I am developing an inventory program in one of my IT classes. So far I have implemented my Camera class correctly, I just need some help configuring my Inventory class. I have underlined the section of my code I am having trouble with. If someone could take a peek and help me out, I would greatly seriously appreciate it. Thanks
class Camera {
// create Scanner to obtain input from command window
private String ProductName; // Product Name
private int ItemNumber; // Item Number
private int NumberofUnits; // Number of Units
private double UnitPrice; // Unit Price
// initialize four-argument constructor
public Camera(String Name, int Number, int Units, double Price) {
ProductName = Name; // validate and store the Product Name
ItemNumber = Number; // validate and store the Item Number
NumberofUnits = Units; // validate and store the Number of Units
UnitPrice = Price; // validate and store the Unit Price
} // end four-argument constructor
// set Department Name
public void setProductName(String title, String Name)
{
ProductName = Name;
}
public String getProductName() {
return ProductName;
}
public void setItemNumber(int Number) {
ItemNumber = Number;
}
public double getItemNumber() {
return ItemNumber;
}
public void setNumberofUnits(int Units) {
NumberofUnits = Units;
}
public double getNumberofUnits() {
return NumberofUnits;
}
public void setUnitPrice(double Price) {
UnitPrice = Price;
}
public double getUnitPrice() {
return UnitPrice;
}
public double value() {
return UnitPrice * NumberofUnits;
}
} // end class Camera
public class Inventory
{
// main methods begins execution of java application
// instantiate cars object
public static void main( String args[])
{
Inventory myCamera = new Inventory( "Sony");
{
System.out.println("Camera Inventory Program");
System.out.printf("Product Name is");
myCamera.getProductName());
System.out.printf("Item Number is");
myCamera.getItemNumber() );
System.out.printf("Number of Units is");
myCamera.getNumberofUnits() );
System.out.printf("Unit Price is"+
myCamera.getUnitPrice());
System.out.println("\n\nEnter Product Name or enter stop to quit:");//prompt
// myCamera.setProductName(input.next());
// read Product Name or stop
}
} // end main method
} // end class Inventory