Hedging my bets, I have coded a simpler version of the program Ezzaral is helping me with. I fear I am in over my head over there and may just begin to annoy him with silly questions.
Most of what he and I are working on is beyond the scope of my class anyways, so I did not mind trying to learn more as it made class simpler. I do not want to end up without a working program to turn in though, so I set out on this one this morning.
I am only having one issue at the moment, and it is with "super".
I am not sure why it is not working in this class.
I am getting cannot find symbol, and I do not understand why.
Can anyone offer assistance?
import java.util.*;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.event.*;
import java.text.*;
import java.lang.*;
class CdwArtist extends Compactdisk
{
private String artist;
// Compactdisk constructor
public CdwArtist(String Name, int item, int nstock, double price, String artist)
{
super(Name, item, nstock, price);
artist = artist;
}
// get values
public void setArtist(String artist)
{
artist=artist;
}
// return value
public String getArtist()
{
return (artist);
}
// returns indivudual inventory value for a disk
public double calcRestock()
{
return price * nstock * 0.05;
}
} //End Class
which extends this class
import java.util.*;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.event.*;
import java.text.*;
import java.lang.*;
class Compactdisk //implements Comparable
{// begin class
//InventoryCD class has 5 fields
protected String Name; // Name of cd
protected double price; // price of cd
protected int itemno; // item number of cd
protected int nstock; // how many units in stock
protected double value; // value for single cd inventory
//Compact disk class constructor
public Compactdisk(String diskName, int cdItemno, int Stock, double cdValue, double cdPrice)
// 4 fields need to be set up
{
Name = diskName;
price = cdPrice;
itemno = cdItemno;
nstock = Stock;
value = cdValue;
}
// set values
public void setName(String diskName)
{
Name = diskName;
}
public void setPrice(double cdprice)
{
price = cdprice;
}
public void setItemno(int cditemno)
{
itemno = cditemno;
}
public void setNstock(int Stock)
{
nstock = Stock;
}
public void setValue(double cdValue)
{
value = cdValue;
}
// return values
public String getName()
{
return Name;
}
public double getPrice()
{
return price;
}
public int getItemno()
{
return itemno;
}
public int getNstock()
{
return nstock;
}
// returns indivudual inventory value for a disk
public double calcValue()
{
return price * nstock;
}
}// end class
which compiles fine. If you need to see the primary class just let me know, but everything looks fine to me here.
Any help would be welcome.