Here is what i have so far for the first part of my Inventory Program part 1
Here is the assignment:
*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.
Here is what i have so far, What am i missing? Any help would be highly appreciated.
Thanks in advance.
java
package inventoryprogrampart1;
// MY DVD CLASS
public class inventoryprogrampart1
{
private static DVDINVENTORY NEW;
// Display DVDNAME, DVDNUMBER,DVDUNITS,DVDCOSTS & INVENTORYVALUE
public static void main(String[] args){
String DVDNAME;
String DVDNUMBER;
String DVDUNITS;
double DVDCOST;
double INVENTORYVALUE = 0;// inventoryvalue of DVDUNITS * DVDCOST
System.out.println("Enter DVDNAME:");
System.out.println("Enter DVDNUMBER:");
System.out.println("Enter DVDUNITS:");
System.out.println("Enter DVDCOST:");
INVENTORYVALUE = DVDUNITS * DVDCOST; // multipy numbers
System.out.printf("INVENTORYVALUE = $%.2f\n",INVENTORYVALUE);
}
}
class DVDINVENTORY
{
private String DVDName;
private String DVDNumber;
private int DVDUNITS;
private double DVDCOST;
private double INVENTORYVALUE;
// Constructor to get information
public DVDINVENTORY(String DVDName, String DVDNumber, int DVDUNITS, double DVDCOST, double INVENTORYVALUE) {
this.DVDName = DVDName;
this.DVDNumber = DVDNumber;
this.DVDUNITS = DVDUNITS;
this.DVDCOST = DVDCOST;
this.INVENTORYVALUE = INVENTORYVALUE;
}
public String getDVDName() {
return DVDName;
}
public void setDVDName(String DVDName) {
this.DVDName = DVDName;
}
public String getDVDNumber() {
return DVDNumber;
}
public void setDVDNumber(String DVDNumber) {
this.DVDNumber = DVDNumber;
}
public int getDVDUNITS() {
return DVDUNITS;
}
public void setDVDUNITS(int DVDUNITS) {
this.DVDUNITS = DVDUNITS;
}
public double getDVDCOST() {
return DVDCOST;
}
public void setDVDCOST(double DVDCOST) {
this.DVDCOST = DVDCOST;
}
public void setINVENTORYVALUE(double INVENTORYVALUE) {
this.INVENTORYVALUE = INVENTORYVALUE;
}
}
*edit: Please use code tags in the future, thanks!
This post has been edited by Martyr2: 5 Jul, 2008 - 11:26 AM