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 money collected
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() {} // returns store name
public double getMoney(){} // return money collected for this store

public String toString() {} // print out what you have in stock for this store with store's name
}


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

________________________________________________________
Write a main program to test your store class. 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. You should have a menu and a loop.

Store s = new Store("One");