packagecom.v5ent.rapid4j.pattern;importjava.util.ArrayList;importjava.util.List;importjava.util.Observable;importjava.util.Observer;importjava.util.Random;/*** American Stock Exchange market(ASE) has a list of stocks.A stock object has two perspective information,symbol and price.
* Class StockMarket is a class that represents the stock market.
* Its constructor generates a collection of stocks using random numbers to build 3-letter stock symbols and random numbers for initial stock price.
* Implement a Java application when the stock price has been changed,all those investors who are interested in the stock market will be notified by receiving the most recent price.
* Create a driver class to test your implementation.
*@authorMignet
**/
public classStockTest {public static voidmain(String[] args) {
StockMarket market= new StockMarket(10);
market.sh