File: /home/mitacsc/tyi341/product.
java Page 1 of 1
import [Link].*;
interface marker
{
}
class product implements marker
{
int pid;
String pname;
int pcost;
int pquantity;
static int count=0;
product()
{
pid=0;
pname=null;
pcost=0;
pquantity=0;
}
product(int pid,String pname,int pcost,int pquantity)
{
[Link]=pid;
[Link]=pname;
[Link]=pcost;
[Link]=pquantity;
}
void display()
{
[Link]("product id="+pid);
[Link]("product name="+pname);
[Link]("product cost="+pcost);
[Link]("product quantity="+pquantity);
}
static void count()
{
count++;
[Link]("count="+count);
}
public static void main(String args[])
{
product p=new product(1,"pen",10,2);
[Link]();
[Link]();
}
}