Question: JAVA PLEASE. 1. Create a factory class that builds a binomial tree given two parameters a. T in integer to indicate the number of time

JAVA PLEASE. JAVA PLEASE. 1. Create a factory class that builds a binomial tree

1. Create a factory class that builds a binomial tree given two parameters a. T in integer to indicate the number of time periods. This is the depth or the length of the tree. The width the height of the tree at the time period T is 2... b. P in integer between 0 and 100 to indicate the probability of up price movement. The probability of down price movement is 100-P. Note: The factory needs to be implemented as public final class with a static method. Refer to the following as an example public final class BinaomialTreeFactory public static Node create(int T, int P) 2. Create a navigator with one parameter N, for the number of iterations. For each iteration: a. Starting from the root node, time zero, call the random function. If the number is between 0 and P, traverse to up-node for the next time period. If the number is between P and 100, traverse to down-node for the next time period. b. Repeat step a, until the time T is reached. c. While traversing the binomial tree, print Time Period, value generated by the random function, and the movement (UP or DOWN) 1. Create a factory class that builds a binomial tree given two parameters a. T in integer to indicate the number of time periods. This is the depth or the length of the tree. The width the height of the tree at the time period T is 2... b. P in integer between 0 and 100 to indicate the probability of up price movement. The probability of down price movement is 100-P. Note: The factory needs to be implemented as public final class with a static method. Refer to the following as an example public final class BinaomialTreeFactory public static Node create(int T, int P) 2. Create a navigator with one parameter N, for the number of iterations. For each iteration: a. Starting from the root node, time zero, call the random function. If the number is between 0 and P, traverse to up-node for the next time period. If the number is between P and 100, traverse to down-node for the next time period. b. Repeat step a, until the time T is reached. c. While traversing the binomial tree, print Time Period, value generated by the random function, and the movement (UP or DOWN)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!