@@ -0,0 +1,1120 @@
+%0Apublic class Stock %7B%0A%09%0A%09/* private stock vars.%0A%09 * String ticker: Ticker of stock. (ex. APPL, YUM, S)%0A%09 * double price: current price of the stock.%0A%09 * double momentum: how the stock price will change every tick in percent.*/%0A%09private String ticker;%0A%09private double price;%0A%09private double momentum;%0A%09%0A%09//the default constructor%0A%09public Stock(String t, double p, double m)%7B%0A%09%09t = t.toUpperCase();%0A%09%09ticker = t.substring(0, Math.min(t.length(), 4));//String shortener%0A%09%09price = p;%0A%09%09momentum = m;%0A%09%7D%0A%09%0A%09//apply the momentum change%0A%09public void changePrice()%7B%0A%09%09price+= (price*momentum);%0A%09%7D%0A%09%0A%09//accessors%0A%09public String getTicker()%7B return ticker; %7D%0A%09public double getPrice()%7B return price; %7D%0A%09public double getMomentum()%7B return momentum; %7D%0A%09%0A%09//modifiers%0A%09%0A%09public void setTicker(String t)%7B ticker = t; %7D%0A%09public void setPrice(double p)%7B price = p; %7D%0A%09public void setMomentum(double m)%7B momentum = m; %7D%0A%09%0A%09public String toString()%7B%0A%09%09String str = ticker + %22: $%22+ price + %22 (%22;%0A%09%09if(momentum %3E= 0)%0A%09%09%09str+= %22%5E%22+momentum + %22)%22;%0A%09%09else%0A%09%09%09str+= %22v%22+Math.abs(momentum)+ %22)%22;//momentum going up or down%0A%09%09return str;%0A%09%7D%0A%09%0A%7D%0A

Create Stock.java