Create an interface, Stock derivatives, with two attributes viz., delta=0.5 and vega=0.2 which are used to determine
Question:
Create an interface, Stock derivatives, with two attributes viz., delta=0.5 and vega=0.2 which are used to determine option premium of a stock. Also add an abstract method
Find Premium. Write a class Options which implements interface Stock derivatives. Options class also contains two attributes called stock price and option premium
This class contains a constructor to initialize stock price. Implement Find Premiumo which determines option premium based on stock price. By using following formula option premium=stock price*delta *vega. Besides implementation of Find Premium(, add another method called cal op0 which changes stock price randomly between 0 and 9 for 10 times and each time display updated option premium using
Find Premium(. To generate random number use inbuilt method Math.random(. Write a main() method that tests in another class named Stock.
Systems analysis and design
ISBN: 978-0136089162
8th Edition
Authors: kenneth e. kendall, julie e. kendall