- illegal start type
- cannot find symbol
- operator cannot be applied
- assignment to itself
Here is what I have done so far. It would be great if there would be someone that would be able to help me throughout the next few weeks of assignments. Thanks
DonE
public class DVDInventory
{
//Inventory for DVD
import java.util.*;
import javax.swing.*;
import java.awt.event.*;
import java.awt.*;
class product comparable
{
String name; //class variable that stores item name
double number; //class variable that stores item number
long stockQuantity; //class variable that stores the quantity in stock
double price; //class variable that stores the items price
public product();
{
name = "";
number = 0.0;
stockQuantity = OL;
price = 0.0;
}
public product(String name,int number,long stockQuantity,double price);
{
this.name = name
this.number = number;
this.stockQuantity = stockQuantity;
this.price = price;
}
public void setItemName(String name)
{
this.name = name;
}
public String getItemName()
{
return name;
}
public void setItemNumber(double number)
{
this.number = number;
}
public double getItemNumber()
{
return number;
}
public void setstockQuantity(long quantity)
{
stockQuantity = quantity;
}
public long getstockQuantity()
{
stockQuantity = quantity;
}
public long get stockQuantity()
{
return stockQuantity;
}
public void setItemPrice(double price)
{
this.price = price;
}
public double getItemPrice()
{
return price;
}
public double calculateInventoryValue()
{
return getItemPrice()*getStockQuantity();
}
public StringtoString()
{
return "\nName:"+getItemName()+"\nNumber:"+number"\nprice :$"+price+
"\nQuantity:"+stockQuantity+"\nValue:$"+calculatIn ventoryValue();
}//end product
class DVD(String name, int number, long stockQuantity, double price,
String titles)
private String titles;
public DVD()
{
super();//call constructor in product
titles = "";//add the additional attribute
}
Public DVD(String name, int number, long stockQuantity, double price,
String titles)
{
super(name, number, stockQuality, price); //call constructor in product
this.titles = titles; //add the additional attribute
}
public void settitle(String title)
{
this.titles = titles;
}
public string gettitles()
{
return titles;
}
public double calculateInventoryValue()
{
return getItenPrice()* getstockQuantity();
}
return "\nName:"+getItemName()+"\nNumber:"+getItemNumber( )+"\nPrice:$"
+getItemPrice()+"\nQuantity:"+getstockQuantity()+" \ntitles:"
gettitles()+"\nValue:$"+CalculateInventoryValue();
}}
}//end DVD