Make your own free website on Tripod.com
class record
{
 public record(String n,int nu,double p)   // constructor
  {na= n;
   numberInStock = nu;
   price = p;
  }
                                  // the record class - save as seperate File
  private String na;
  private int numberInStock;
  private double price;
  public String getName() { }
  public int getStock() {}
  public double getPrice() { }
}

**************************************************

class recordStore
 {final int MAX = 10;
  private record[] ar = new record[MAX];
  private int ct = 0;         // number of records

  public void printStock()   // prints name and quantities of records
   {
    }

  public boolean addOne(String n,int nu, double p) 
   {                 // adds a record if room otherwise returns false
    }

   public boolean deleteRecord(String n)
      {  // removes a record from store if there - otherwise returns false
      }

   public boolean sellOne(String n)
    {   // sells 1 record if name is there and there is one in stock
    }
    
    public boolean addToStock(String n, int nu)
      { // if name is there adds n records to stick
      }
      
    public boolean changePrice(String n, double pr)
     { // changes price to pr if record is there
      }
  }