This is an extra credit assignment. You must get it workingand e-mail it to Mr. Nilan at 
jacknilan@yahoo.com before we return to school from the Holidays. Nothing will be
accepted once we are back at school. Nothing will be accepted on paper. The purpose
of giving this extra credit assignment is to get you working on the computer.

Do not help (or copy) from another student. If you do you will both get no extra credit.

You may e-mail me, sending me you code and I will help you.


Write a class that only has 3 items. There are apples, pears and oranges. We are keeping track of 
how many of each we have in stock. How many of each we have sold. The current prices of each.
And how much money we have sold them for in total.

class Store
 {private String storename;
  private int apples = 0;
  private int pears = 0;
  private int oranges = 0;  
  private double appleprice = .59;
  private double pearprice = .49;
  private double orangeprice  = .83;
  private double moneycollected = 0; 

  public Store(String na) {} // sets store name

  public void addtoApples(int n){}
  public void addtoPears(int n){}
  public void addtoOranges(int n){}

  public void changeApplePrice(double d)()
  public void changeOrangePrice(double d)()
  public void changePearPrice(double d)()
  
  public void sellApples(int n) {}   // only sell if you have that many - don't forget to change moneycollected
  public void sellPears(int n) {}    // don't forget prices of fruit is subject to change
  public void sellOranges(int n) {}
  public int getPears(){}    // return how many you have
  public int getApples(){}
  public int getOranges(){}
  public void setMoney(){}
  public String getName() {}
  public double getMoney(){}  // return money collected for this store

  public Store addStores(Store a){}  // form a new store with stock from both stores and moneycollected from both - new store's name should be concatenation of other 2
  
  public String toString() {}  // print out what you have in stock for this store with store's name
 }   

Once you hav the class written save it as Store.java and then compile it


________________________________________________________

Start a new prgram copying the top of the test class. Class the class storetest and save it as storeTest.java

In the main program declare a new store and them try out each of the member functions to see if they work. 

Store s = new Store("One");