(Solved):Design a class named Stock that contains the following: 1. A Symbol enum field named symbol for the stock’s symbol. 2. A double data field named previousClosingPrice that stores the stock price for… View Answer…

 

Question

Design a class named Stock that contains the following:

1. A Symbol enum field named symbol for the stock’s symbol.

2. A double data field named previousClosingPrice that stores the stock price for the previous day.

3. A double data field named currentPrice that stores the stock price for the current time.

4. A constructor that creates a stock with specified symbol and name.

5. The accessor functions for all data fields.

6. The mutator functions

Scroll to top