Create a Java project calledStockTask
1. Write an object class namedStock that contains:
2. Write a test class namedtestStock that creates aStock object with the stock symbolSUNW, the nameSun Microsystems Inc., and the previous closing price of100.
Set a new current price to90. Display the symbol and name of the company, the previous and current prices and price-change percentage.
Example of output:
Stock symbol: SUMW
Stock name: Sun Microsystems Inc.
Previous Closing Price: 100.0
Current price: 90.0
Price change: -10.0%
Add code to create anotherStock object with the stock symbolORCL, the nameOracle Corporation/
Stock symbol: ORCL
Stock name: Oracle Corporation
Previous Closing Price: 34.5
Current Price: 38.75
Price Change: 12.32%
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here