- 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,d ouble price);
{
this.name = name
this.number = number;
this.stockQuant ity = stockQuantity;
this.price = price;
}
public void setItemName(Str ing name)
{
this.name = name;
}
public String getItemName()
{
return name;
}
public void setItemNumber(d ouble number)
{
this.number = number;
}
public double getItemNumber()
{
return number;
}
public void setstockQuantit y(long quantity)
{
stockQuantity = quantity;
}
public long getstockQuantit y()
{
stockQuantity = quantity;
}
public long get stockQuantity()
{
return stockQuantity;
}
public void setItemPrice(do uble price)
{
this.price = price;
}
public double getItemPrice()
{
return price;
}
public double calculateInvent oryValue()
{
return getItemPrice()* getStockQuantit y();
}
public StringtoString( )
{
return "\nName:"+getIt emName()+"\nNum ber:"+number"\n price:$"+price+
"\nQuantity:"+s tockQuantity+"\ nValue:$"+calcu latInventoryVal ue();
}//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 calculateInvent oryValue()
{
return getItenPrice()* getstockQuantit y();
}
return "\nName:"+getIt emName()+"\nNum ber:"+getItemNu mber()+"\nPrice :$"
+getItemPrice() +"\nQuantity:"+ getstockQuantit y()+"\ntitles:"
gettitles()+"\n Value:$"+Calcul ateInventoryVal ue();
}}
}//end DVD